Skip to content

Commit

Permalink
blog-template: use c8 for coverage reports
Browse files Browse the repository at this point in the history
* track vitest-dev/vitest#691
* add c8 config from vitest
  • Loading branch information
wight554 committed Feb 7, 2022
1 parent a67d34b commit 5256096
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .c8rc.json
@@ -0,0 +1,22 @@
{
"enabled": false,
"clean": true,
"cleanOnRerun": false,
"reportsDirectory": "./coverage",
"excludeNodeModules": true,
"reporter": ["text", "html"],
"allowExternal": false,
"extension": [".js", ".cjs", ".mjs", ".ts", ".tsx", ".jsx", ".vue", "svelte"],
"exclude": [
"coverage/**",
"packages/*/test{,s}/**",
"**/*.d.ts",
"cypress/**",
"test{,s}/**",
"test{,-*}.{js,cjs,mjs,ts,tsx,jsx}",
"**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}",
"**/__tests__/**",
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc}.config.{js,cjs,mjs,ts}",
"**/.{eslint,mocha}rc.{js,cjs}"
]
}
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -9,7 +9,7 @@
"build": "npm run build:client && npm run build:server",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "npm run test -- --coverage",
"test:coverage": "c8 report",
"lint": "eslint \"{src,server}/**/*.{ts,tsx}\"",
"lint:fix": "npm run lint -- --fix",
"format": "prettier --write \"src/**/*.{ts,tsx}\" \"server/**/*.ts\"",
Expand Down

0 comments on commit 5256096

Please sign in to comment.