Skip to content

Commit

Permalink
fix: json reporter detects skip mode correctly (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
stygian-desolator committed Mar 12, 2022
1 parent 6262c29 commit 5993ce1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/vitest/src/node/reporters/json.ts
Expand Up @@ -56,7 +56,7 @@ export class JsonReporter implements Reporter {
const testResults: Array<TestResult> = tests.map(t => ({
displayName: t.name,
failureMessage: t.result?.error?.message,
skipped: t.result?.state === 'skip',
skipped: t.mode === 'skip',
status: t.result?.state,
testFilePath: t.file?.filepath,
}))
Expand Down
2 changes: 1 addition & 1 deletion test/reporters/tests/__snapshots__/reporters.spec.ts.snap
Expand Up @@ -59,7 +59,7 @@ exports[`json reporter 1`] = `
},
{
\\"displayName\\": \\"async with timeout\\",
\\"skipped\\": false,
\\"skipped\\": true,
\\"testFilePath\\": \\"/vitest/test/core/test/basic.test.ts\\"
},
{
Expand Down

0 comments on commit 5993ce1

Please sign in to comment.