1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 01:29:14 -05:00
denoland-deno/tests/specs/fmt/html/__test__.jsonc
Bartek Iwańczuk 6c26c1ed96
feat(fmt): better error on malfored HTML files (#25853)
Improves syntax errors for HTML formatter.

`broken.html`

```html
<div class=container > content 
```

```
$ deno fmt broken.html
Error formatting: /Users/ib/dev/deno/tests/specs/fmt/html/broken.html
   syntax error 'expect close tag' at line 3, column 0
Checked 1 file
```

```
$ ./target/debug/deno fmt broken.html
Error formatting: /Users/ib/dev/deno/tests/specs/fmt/html/broken.html
   Syntax error (expect close tag) at file:///Users/ib/dev/deno/tests/specs/fmt/html/broken.html:3:0

Checked 1 file
```
2024-09-25 01:00:16 +00:00

17 lines
380 B
Text

{
"tempDir": true,
"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"
},
"broken": {
"args": "fmt broken.html",
"output": "broken.out"
}
}
}