Skip to content

Commit 6de005f

Browse files
authored
Enable code coverage on test reports (#251)
1 parent 009fba6 commit 6de005f

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ output
3232
# Per user
3333
.hintrc
3434
.nx/installation
35-
.nx/cache
35+
.nx/cache
36+
37+
# Code coverage
38+
coverage/

package/shared.wdio.conf.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,30 @@ export const config: Options.Testrunner = {
1111
// ====================
1212
// WebdriverIO supports running e2e tests as well as unit and component tests.
1313

14-
runner: ["browser", { viteConfig: "./vite.config.ts" }],
14+
runner: [
15+
"browser",
16+
{
17+
viteConfig: "./vite.config.ts",
18+
coverage: {
19+
enabled: true,
20+
exclude: [
21+
"src/MW.ts",
22+
"coverage/**",
23+
"dist/**",
24+
"packages/*/test{,s}/**",
25+
"**/*.d.ts",
26+
"cypress/**",
27+
"test{,s}/**",
28+
"test{,-*}.{js,cjs,mjs,ts,tsx,jsx}",
29+
"**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}",
30+
"**/*{.,-}spec.{js,cjs,mjs,ts,tsx,jsx}",
31+
"**/__tests__/**",
32+
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
33+
"**/.{eslint,mocha,prettier}rc.{js,cjs,yml}",
34+
],
35+
},
36+
},
37+
],
1538
autoCompileOpts: {
1639
autoCompile: true,
1740
tsNodeOpts: {

0 commit comments

Comments
 (0)