Skip to content

Commit

Permalink
vitest config
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Ball committed Dec 27, 2023
1 parent d12e2bc commit f935957
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"build": "rimraf dist && tsc",
"test": "vitest run",
"test-ci": "vitest run --coverage.enabled true --reporter default --reporter json --coverage.reporter json-summary",
"test-ci": "vitest run --coverage.enabled true",
"pack": "npm run build && cpx {package.json,README.md} dist && npm pack ./dist --dry-run",
"publish-npm": "npm run build && cpx {package.json,README.md} dist && npm publish ./dist"
},
Expand Down
12 changes: 12 additions & 0 deletions vitest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'vite';

export default defineConfig({
test: {
coverage: {
// you can include other reporters, but 'json-summary' is required, json is recommended
reporter: ['text', 'json-summary', 'json'],
// If you want a coverage reports even if your tests are failing, include the reportOnFailure option
reportOnFailure: true,
}
}
});

0 comments on commit f935957

Please sign in to comment.