diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-01-24 21:07:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-24 21:07:00 +0100 |
commit | e1c51f3c0d595542fe471359916df2a7b6be5484 (patch) | |
tree | cb213509a20a46a208f6623b4012c9f4845bf3c8 /cli/tests | |
parent | abd96105300a7729a4d8eb69af2e81dd6307a163 (diff) |
feat(fmt): add ability to configure semicolons (#17292)
Allows to change behavior of `deno fmt` to use "ASI" setting for
semicolons instead of always prefering them, this is done
by "--options-semi=asi" flag or `"semi": "asi"` setting
in the config file.
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/testdata/fmt/with_config/deno.jsonc | 3 | ||||
-rw-r--r-- | cli/tests/testdata/fmt/with_config/subdir/a.ts | 18 | ||||
-rw-r--r-- | cli/tests/testdata/run/with_config/auto_discovery_log.out | 2 |
3 files changed, 12 insertions, 11 deletions
diff --git a/cli/tests/testdata/fmt/with_config/deno.jsonc b/cli/tests/testdata/fmt/with_config/deno.jsonc index 3b9474e64..8901d6222 100644 --- a/cli/tests/testdata/fmt/with_config/deno.jsonc +++ b/cli/tests/testdata/fmt/with_config/deno.jsonc @@ -13,7 +13,8 @@ "lineWidth": 40, "indentWidth": 8, "singleQuote": true, - "proseWrap": "always" + "proseWrap": "always", + "semiColons": "asi" } } } diff --git a/cli/tests/testdata/fmt/with_config/subdir/a.ts b/cli/tests/testdata/fmt/with_config/subdir/a.ts index 4baf8d485..5474b3aa3 100644 --- a/cli/tests/testdata/fmt/with_config/subdir/a.ts +++ b/cli/tests/testdata/fmt/with_config/subdir/a.ts @@ -4,33 +4,33 @@ Deno.test( const response = await fetch( 'http://localhost:4545/assets/fixture.json', - ); + ) const response1 = - response.clone(); + response.clone() assert( response !== response1, - ); + ) assertEquals( response.status, response1 .status, - ); + ) assertEquals( response.statusText, response1 .statusText, - ); + ) const u8a = new Uint8Array( await response .arrayBuffer(), - ); + ) const u8a1 = new Uint8Array( await response1 .arrayBuffer(), - ); + ) for ( let i = 0; i < @@ -40,7 +40,7 @@ Deno.test( assertEquals( u8a[i], u8a1[i], - ); + ) } }, -); +) diff --git a/cli/tests/testdata/run/with_config/auto_discovery_log.out b/cli/tests/testdata/run/with_config/auto_discovery_log.out index a1f4ada1d..601c1adc6 100644 --- a/cli/tests/testdata/run/with_config/auto_discovery_log.out +++ b/cli/tests/testdata/run/with_config/auto_discovery_log.out @@ -1,3 +1,3 @@ -DEBUG RS - deno::args::config_file:529 - Config file found at '[WILDCARD]deno.jsonc' +DEBUG RS - [WILDCARD] - Config file found at '[WILDCARD]deno.jsonc' [WILDCARD] ok |