Skip to content

Commit e94caf5

Browse files
committed
test(check): add follow-up vp check after vp check --fix in lint warn snap test
Verify that a plain `vp check` also exits with code 0 when only warnings are present, matching the --fix behavior.
1 parent 391f785 commit e94caf5

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

packages/cli/snap-tests/check-fix-lint-warn/snap.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,17 @@ warn: Lint warnings found
1111

1212
Found 0 errors and 1 warning in 1 file (<variable>ms, <variable> threads)
1313
pass: Formatting completed for checked files (<variable>ms)
14+
15+
> vp check
16+
pass: All 4 files are correctly formatted (<variable>ms, <variable> threads)
17+
warn: Lint warnings found
18+
⚠ eslint(no-console): Unexpected console statement.
19+
╭─[src/index.js:2:3]
20+
1 │ function hello() {
21+
2 │ console.log("hello");
22+
· ───────────
23+
3 │ }
24+
╰────
25+
help: Delete this console statement.
26+
27+
Found 0 errors and 1 warning in 1 file (<variable>ms, <variable> threads)

packages/cli/snap-tests/check-fix-lint-warn/steps.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"env": {
33
"VITE_DISABLE_AUTO_INSTALL": "1"
44
},
5-
"commands": ["vp check --fix"]
5+
"commands": ["vp check --fix", "vp check"]
66
}

0 commit comments

Comments
 (0)