diff options
Diffstat (limited to 'tests/specs')
-rw-r--r-- | tests/specs/fmt/css/__test__.jsonc | 12 | ||||
-rw-r--r-- | tests/specs/fmt/css/well_formatted.css | 3 | ||||
-rw-r--r-- | tests/specs/fmt/html/__test__.jsonc | 12 | ||||
-rw-r--r-- | tests/specs/fmt/html/well_formatted.html | 11 | ||||
-rw-r--r-- | tests/specs/fmt/yaml/__test__.jsonc | 14 | ||||
-rw-r--r-- | tests/specs/fmt/yaml/well_formatted.yml | 3 |
6 files changed, 48 insertions, 7 deletions
diff --git a/tests/specs/fmt/css/__test__.jsonc b/tests/specs/fmt/css/__test__.jsonc index e58818fbe..a3ded6d43 100644 --- a/tests/specs/fmt/css/__test__.jsonc +++ b/tests/specs/fmt/css/__test__.jsonc @@ -1,5 +1,13 @@ { "tempDir": true, - "args": "fmt", - "output": "[WILDLINE]badly_formatted.css\nChecked 1 file\n" + "tests": { + "badly_formatted": { + "args": "fmt badly_formatted.css", + "output": "[WILDLINE]badly_formatted.css\nChecked 1 file\n" + }, + "well_formatted": { + "args": "fmt --check well_formatted.css", + "output": "Checked 1 file\n" + } + } } diff --git a/tests/specs/fmt/css/well_formatted.css b/tests/specs/fmt/css/well_formatted.css new file mode 100644 index 000000000..1653551f4 --- /dev/null +++ b/tests/specs/fmt/css/well_formatted.css @@ -0,0 +1,3 @@ +#app > .btn { + color: #000; +} diff --git a/tests/specs/fmt/html/__test__.jsonc b/tests/specs/fmt/html/__test__.jsonc index cec29d1b3..7f3169423 100644 --- a/tests/specs/fmt/html/__test__.jsonc +++ b/tests/specs/fmt/html/__test__.jsonc @@ -1,5 +1,13 @@ { "tempDir": true, - "args": "fmt --unstable-html", - "output": "[WILDLINE]badly_formatted.html\nChecked 1 file\n" + "tests": { + "badly_formatted": { + "args": "fmt badly_formatted.html", + "output": "[WILDLINE]badly_formatted.html\nChecked 1 file\n" + }, + "well_formatted": { + "args": "fmt --check well_formatted.html", + "output": "Checked 1 file\n" + } + } } diff --git a/tests/specs/fmt/html/well_formatted.html b/tests/specs/fmt/html/well_formatted.html new file mode 100644 index 000000000..c0c06cd9b --- /dev/null +++ b/tests/specs/fmt/html/well_formatted.html @@ -0,0 +1,11 @@ +<div class="container">content</div> + +<script> + let counter = 0; +</script> + +<style> + .container { + padding: 8px; + } +</style> diff --git a/tests/specs/fmt/yaml/__test__.jsonc b/tests/specs/fmt/yaml/__test__.jsonc index 3cef276b8..499b4144b 100644 --- a/tests/specs/fmt/yaml/__test__.jsonc +++ b/tests/specs/fmt/yaml/__test__.jsonc @@ -1,5 +1,13 @@ { "tempDir": true, - "args": "fmt", - "output": "[WILDLINE]badly_formatted.yml\nChecked 1 file\n" -}
\ No newline at end of file + "tests": { + "badly_formatted": { + "args": "fmt badly_formatted.yml", + "output": "[WILDLINE]badly_formatted.yml\nChecked 1 file\n" + }, + "well_formatted": { + "args": "fmt --check well_formatted.yml", + "output": "Checked 1 file\n" + } + } +} diff --git a/tests/specs/fmt/yaml/well_formatted.yml b/tests/specs/fmt/yaml/well_formatted.yml new file mode 100644 index 000000000..016e0b951 --- /dev/null +++ b/tests/specs/fmt/yaml/well_formatted.yml @@ -0,0 +1,3 @@ +- Test +- Test +- Test |