summaryrefslogtreecommitdiff
path: root/cli/tests/fmt
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2021-01-19 23:09:35 +0530
committerGitHub <noreply@github.com>2021-01-19 18:39:35 +0100
commit16036a8a5170030a95a56b28b29b1b355d0d0f80 (patch)
tree87d6e5dfe13662270df61a5221efe814b4b1f40f /cli/tests/fmt
parent4c223d0521bf9711ccd4813a04ba7b1f7899485b (diff)
feat: add markdown support to deno fmt (#8887)
This commit adds support for formatting markdown files with "deno fmt". Additionally "--ext={js|jsx|ts|tsx|md}" flag was added to "deno fmt" that allows to specify file type when providing contents over stdio.
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/formatted3.md17
4 files changed, 20 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 158c556c2..7c1e471b9 100644
--- a/cli/tests/fmt/expected_fmt_check_formatted_files.out
+++ b/cli/tests/fmt/expected_fmt_check_formatted_files.out
@@ -1 +1 @@
-Checked 2 files
+Checked 3 files
diff --git a/cli/tests/fmt/expected_fmt_check_ignore.out b/cli/tests/fmt/expected_fmt_check_ignore.out
index c05ac45a1..158c556c2 100644
--- a/cli/tests/fmt/expected_fmt_check_ignore.out
+++ b/cli/tests/fmt/expected_fmt_check_ignore.out
@@ -1 +1 @@
-Checked 1 file
+Checked 2 files
diff --git a/cli/tests/fmt/expected_fmt_check_tests_dir.out b/cli/tests/fmt/expected_fmt_check_tests_dir.out
index 00d7cb3fa..e2dc2b4ae 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 5 not formatted files in [WILDCARD] files
+error: Found 6 not formatted files in [WILDCARD] files
diff --git a/cli/tests/fmt/formatted3.md b/cli/tests/fmt/formatted3.md
new file mode 100644
index 000000000..e6e616584
--- /dev/null
+++ b/cli/tests/fmt/formatted3.md
@@ -0,0 +1,17 @@
+# Hello
+
+```js
+function foo() {
+ return 42;
+}
+
+foo();
+```
+
+```ts
+function bar(): number {
+ return 42;
+}
+
+bar();
+```