diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-09-23 17:01:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 18:01:04 +0200 |
commit | a7ac89935b092f86245ce0370042f4bef14ad82d (patch) | |
tree | 01a3cba6b7f83c65e0318a8e7eef69d46a7f82ed /tests/specs | |
parent | be13da5d8d08c105e73bc966f681a02b863903d1 (diff) |
feat(fmt): stabilize CSS, HTML and YAML formatters (#25753)
This commits stabilizes CSS, HTML and YAML formatters
in `deno fmt`.
It is no longer required to use either of these flags:
- `--unstable-css`
- `--unstable-html`
- `--unstable-yaml`
Or these `unstable` options in the config file:
- `fmt-css`
- `fmt-html`
- `html-yaml`
Diffstat (limited to 'tests/specs')
-rw-r--r-- | tests/specs/fmt/css/__test__.jsonc | 5 | ||||
-rw-r--r-- | tests/specs/fmt/css/badly_formatted.css (renamed from tests/specs/fmt/unstable_css/badly_formatted.css) | 0 | ||||
-rw-r--r-- | tests/specs/fmt/html/__test__.jsonc | 5 | ||||
-rw-r--r-- | tests/specs/fmt/html/badly_formatted.html (renamed from tests/specs/fmt/unstable_html/badly_formatted.html) | 0 | ||||
-rw-r--r-- | tests/specs/fmt/unstable_component/__test__.jsonc | 4 | ||||
-rw-r--r-- | tests/specs/fmt/unstable_css/__test__.jsonc | 25 | ||||
-rw-r--r-- | tests/specs/fmt/unstable_html/__test__.jsonc | 25 | ||||
-rw-r--r-- | tests/specs/fmt/unstable_yaml/__test__.jsonc | 25 | ||||
-rw-r--r-- | tests/specs/fmt/yaml/__test__.jsonc | 5 | ||||
-rw-r--r-- | tests/specs/fmt/yaml/badly_formatted.yml (renamed from tests/specs/fmt/unstable_yaml/badly_formatted.yml) | 0 |
10 files changed, 17 insertions, 77 deletions
diff --git a/tests/specs/fmt/css/__test__.jsonc b/tests/specs/fmt/css/__test__.jsonc new file mode 100644 index 000000000..e58818fbe --- /dev/null +++ b/tests/specs/fmt/css/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "tempDir": true, + "args": "fmt", + "output": "[WILDLINE]badly_formatted.css\nChecked 1 file\n" +} diff --git a/tests/specs/fmt/unstable_css/badly_formatted.css b/tests/specs/fmt/css/badly_formatted.css index e57adb796..e57adb796 100644 --- a/tests/specs/fmt/unstable_css/badly_formatted.css +++ b/tests/specs/fmt/css/badly_formatted.css diff --git a/tests/specs/fmt/html/__test__.jsonc b/tests/specs/fmt/html/__test__.jsonc new file mode 100644 index 000000000..cec29d1b3 --- /dev/null +++ b/tests/specs/fmt/html/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "tempDir": true, + "args": "fmt --unstable-html", + "output": "[WILDLINE]badly_formatted.html\nChecked 1 file\n" +} diff --git a/tests/specs/fmt/unstable_html/badly_formatted.html b/tests/specs/fmt/html/badly_formatted.html index de7706ac7..de7706ac7 100644 --- a/tests/specs/fmt/unstable_html/badly_formatted.html +++ b/tests/specs/fmt/html/badly_formatted.html diff --git a/tests/specs/fmt/unstable_component/__test__.jsonc b/tests/specs/fmt/unstable_component/__test__.jsonc index a8f8697da..36057cbef 100644 --- a/tests/specs/fmt/unstable_component/__test__.jsonc +++ b/tests/specs/fmt/unstable_component/__test__.jsonc @@ -6,14 +6,14 @@ "output": "Checked 1 file\n" }, "flag": { - "args": "fmt --unstable-css --unstable-component", + "args": "fmt --unstable-component", "output": "[WILDLINE]badly_formatted.svelte\nChecked 1 file\n" }, "config_file": { "steps": [{ "args": [ "eval", - "Deno.writeTextFile('deno.json', '{\\n \"unstable\": [\"fmt-css\", \"fmt-component\"]\\n}\\n')" + "Deno.writeTextFile('deno.json', '{\\n \"unstable\": [\"fmt-component\"]\\n}\\n')" ], "output": "[WILDCARD]" }, { diff --git a/tests/specs/fmt/unstable_css/__test__.jsonc b/tests/specs/fmt/unstable_css/__test__.jsonc deleted file mode 100644 index 32259f3ae..000000000 --- a/tests/specs/fmt/unstable_css/__test__.jsonc +++ /dev/null @@ -1,25 +0,0 @@ -{ - "tempDir": true, - "tests": { - "nothing": { - "args": "fmt", - "output": "Checked 1 file\n" - }, - "flag": { - "args": "fmt --unstable-css", - "output": "[WILDLINE]badly_formatted.css\nChecked 1 file\n" - }, - "config_file": { - "steps": [{ - "args": [ - "eval", - "Deno.writeTextFile('deno.json', '{\\n \"unstable\": [\"fmt-css\"]\\n}\\n')" - ], - "output": "[WILDCARD]" - }, { - "args": "fmt", - "output": "[WILDLINE]badly_formatted.css\nChecked 2 files\n" - }] - } - } -} diff --git a/tests/specs/fmt/unstable_html/__test__.jsonc b/tests/specs/fmt/unstable_html/__test__.jsonc deleted file mode 100644 index 2394805ad..000000000 --- a/tests/specs/fmt/unstable_html/__test__.jsonc +++ /dev/null @@ -1,25 +0,0 @@ -{ - "tempDir": true, - "tests": { - "nothing": { - "args": "fmt", - "output": "Checked 1 file\n" - }, - "flag": { - "args": "fmt --unstable-css --unstable-html", - "output": "[WILDLINE]badly_formatted.html\nChecked 1 file\n" - }, - "config_file": { - "steps": [{ - "args": [ - "eval", - "Deno.writeTextFile('deno.json', '{\\n \"unstable\": [\"fmt-css\", \"fmt-html\"]\\n}\\n')" - ], - "output": "[WILDCARD]" - }, { - "args": "fmt", - "output": "[WILDLINE]badly_formatted.html\nChecked 2 files\n" - }] - } - } -} diff --git a/tests/specs/fmt/unstable_yaml/__test__.jsonc b/tests/specs/fmt/unstable_yaml/__test__.jsonc deleted file mode 100644 index 885db59b9..000000000 --- a/tests/specs/fmt/unstable_yaml/__test__.jsonc +++ /dev/null @@ -1,25 +0,0 @@ -{ - "tempDir": true, - "tests": { - "nothing": { - "args": "fmt", - "output": "Checked 1 file\n" - }, - "flag": { - "args": "fmt --unstable-yaml", - "output": "[WILDLINE]badly_formatted.yml\nChecked 1 file\n" - }, - "config_file": { - "steps": [{ - "args": [ - "eval", - "Deno.writeTextFile('deno.json', '{\\n \"unstable\": [\"fmt-yaml\"]\\n}\\n')" - ], - "output": "[WILDCARD]" - }, { - "args": "fmt", - "output": "[WILDLINE]badly_formatted.yml\nChecked 2 files\n" - }] - } - } -}
\ No newline at end of file diff --git a/tests/specs/fmt/yaml/__test__.jsonc b/tests/specs/fmt/yaml/__test__.jsonc new file mode 100644 index 000000000..3cef276b8 --- /dev/null +++ b/tests/specs/fmt/yaml/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "tempDir": true, + "args": "fmt", + "output": "[WILDLINE]badly_formatted.yml\nChecked 1 file\n" +}
\ No newline at end of file diff --git a/tests/specs/fmt/unstable_yaml/badly_formatted.yml b/tests/specs/fmt/yaml/badly_formatted.yml index 49646f320..49646f320 100644 --- a/tests/specs/fmt/unstable_yaml/badly_formatted.yml +++ b/tests/specs/fmt/yaml/badly_formatted.yml |