diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 418b227..f430ae4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,15 +5,15 @@ name: CI on: push: - branches: [ "main" ] + branches: ['main'] pull_request: - branches: [ "main" ] + branches: ['main'] jobs: build: strategy: matrix: - os: [ ubuntu-latest, windows-latest ] + os: [ubuntu-latest, windows-latest] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ runs-on: ${{ matrix.os }} diff --git a/test/inlineTable.ts b/test/inlineTable.ts index 50d22b7..e2fdfbd 100644 --- a/test/inlineTable.ts +++ b/test/inlineTable.ts @@ -17,7 +17,7 @@ it('should support empty inline tables', () => { const input = 'a = {}'; const result = load(input); - expect(result).toEqual({a: {}}); + expect(result).toEqual({ a: {} }); }); it('should support all value types in inline tables', () => { @@ -31,7 +31,7 @@ it('should support all value types in inline tables', () => { d: true, e: new Date(Date.UTC(1979, 4, 27, 7, 32, 0)), f: [1, 2, 3], - g: {h: 4}, + g: { h: 4 }, }, }); }); @@ -54,7 +54,7 @@ line string""" }`; const result = load(input); - expect(result).toEqual({a: {b: 'multi\nline\nstring'}}); + expect(result).toEqual({ a: { b: 'multi\nline\nstring' } }); }); it('should throw error if adding keys outside the inline table', () => { @@ -76,8 +76,14 @@ it('should support use inline tables as values in arrays', () => { const input = `points = [ { x = 1, y = 2, z = 3 }, { x = 7, y = 8, z = 9 }, { x = 2, y = 4, z = 8 } ] -` +`; const result = load(input); - expect(result).toEqual({points: [{x: 1, y: 2, z: 3}, {x: 7, y: 8, z: 9}, {x: 2, y: 4, z: 8}]}); + expect(result).toEqual({ + points: [ + { x: 1, y: 2, z: 3 }, + { x: 7, y: 8, z: 9 }, + { x: 2, y: 4, z: 8 }, + ], + }); }); diff --git a/testcase/valid/array/empty.json b/testcase/valid/array/empty.json index 7b1ca0c..81f6f69 100644 --- a/testcase/valid/array/empty.json +++ b/testcase/valid/array/empty.json @@ -1,11 +1,3 @@ { - "thevoid": [ - [ - [ - [ - [] - ] - ] - ] - ] + "thevoid": [[[[[]]]]] } diff --git a/testcase/valid/inline-table/empty.json b/testcase/valid/inline-table/empty.json index 28beacf..e3aca81 100644 --- a/testcase/valid/inline-table/empty.json +++ b/testcase/valid/inline-table/empty.json @@ -19,11 +19,7 @@ } } ], - "many_empty": [ - {}, - {}, - {} - ], + "many_empty": [{}, {}, {}], "nested_empty": { "empty": {} } diff --git a/testcase/valid/inline-table/nest.json b/testcase/valid/inline-table/nest.json index 70aebb3..e663ec2 100644 --- a/testcase/valid/inline-table/nest.json +++ b/testcase/valid/inline-table/nest.json @@ -1,9 +1,5 @@ { - "arr_arr_tbl_empty": [ - [ - {} - ] - ], + "arr_arr_tbl_empty": [[{}]], "arr_arr_tbl_val": [ [ {