summaryrefslogtreecommitdiff
path: root/cli/tests/fmt
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2021-02-18 22:01:32 +0530
committerGitHub <noreply@github.com>2021-02-18 17:31:32 +0100
commitd9b1f96897239bf7de8cdfd11d40e3f99bb29a4a (patch)
tree4a1c60d4850111f738b485bbad5f43659bd9ed09 /cli/tests/fmt
parentc0f10e72ee64f1512e6aff20a841f4696e774217 (diff)
feat: add json(c) support to deno fmt (#9292)
This commit adds support for formatting JSON and JSONC in "deno fmt". New values "json" and "jsonc" are added to "--ext" flag for standard input processing.
Diffstat (limited to 'cli/tests/fmt')
-rw-r--r--cli/tests/fmt/expected_fmt_check_formatted_files.out2
-rw-r--r--cli/tests/fmt/expected_fmt_check_ignore.out2
-rw-r--r--cli/tests/fmt/expected_fmt_check_tests_dir.out2
-rw-r--r--cli/tests/fmt/formatted4.jsonc4
4 files changed, 7 insertions, 3 deletions
diff --git a/cli/tests/fmt/expected_fmt_check_formatted_files.out b/cli/tests/fmt/expected_fmt_check_formatted_files.out
index 7c1e471b9..5a4833dd4 100644
--- a/cli/tests/fmt/expected_fmt_check_formatted_files.out
+++ b/cli/tests/fmt/expected_fmt_check_formatted_files.out
@@ -1 +1 @@
-Checked 3 files
+Checked 4 files
diff --git a/cli/tests/fmt/expected_fmt_check_ignore.out b/cli/tests/fmt/expected_fmt_check_ignore.out
index 158c556c2..7c1e471b9 100644
--- a/cli/tests/fmt/expected_fmt_check_ignore.out
+++ b/cli/tests/fmt/expected_fmt_check_ignore.out
@@ -1 +1 @@
-Checked 2 files
+Checked 3 files
diff --git a/cli/tests/fmt/expected_fmt_check_tests_dir.out b/cli/tests/fmt/expected_fmt_check_tests_dir.out
index e2dc2b4ae..fe84cd485 100644
--- a/cli/tests/fmt/expected_fmt_check_tests_dir.out
+++ b/cli/tests/fmt/expected_fmt_check_tests_dir.out
@@ -1,2 +1,2 @@
[WILDCARD]
-error: Found 6 not formatted files in [WILDCARD] files
+error: Found 7 not formatted files in [WILDCARD] files
diff --git a/cli/tests/fmt/formatted4.jsonc b/cli/tests/fmt/formatted4.jsonc
new file mode 100644
index 000000000..f0f72a6ed
--- /dev/null
+++ b/cli/tests/fmt/formatted4.jsonc
@@ -0,0 +1,4 @@
+{
+ // Comment
+ "key": "value"
+}