summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-01-24 21:07:00 +0100
committerGitHub <noreply@github.com>2023-01-24 21:07:00 +0100
commite1c51f3c0d595542fe471359916df2a7b6be5484 (patch)
treecb213509a20a46a208f6623b4012c9f4845bf3c8 /cli/tests
parentabd96105300a7729a4d8eb69af2e81dd6307a163 (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.jsonc3
-rw-r--r--cli/tests/testdata/fmt/with_config/subdir/a.ts18
-rw-r--r--cli/tests/testdata/run/with_config/auto_discovery_log.out2
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