Skip to content

Commit 7c37490

Browse files
committed
improve coverage report
1 parent 5c3d44e commit 7c37490

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

vitest.config.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,45 @@ export default defineConfig({
88
globals: true,
99
environment: 'jsdom',
1010
setupFiles: ['./vitest.setup.ts'],
11-
// Exclude E2E tests
1211
exclude: [
1312
'**/node_modules/**',
1413
'**/dist/**',
1514
'**/cypress/**',
1615
'**/.{idea,git,cache,output,temp}/**',
1716
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
1817
'test/e2e/**',
18+
'public/**',
19+
'**/*.config.*',
1920
],
2021
coverage: {
2122
provider: 'v8',
2223
reporter: ['text', 'json', 'html'],
24+
reportsDirectory: './coverage',
25+
include: ['app/**/*.{js,jsx,ts,tsx}', 'lib/**/*.{js,jsx,ts,tsx}', 'middleware.ts'],
26+
exclude: [
27+
'**/node_modules/**',
28+
'**/dist/**',
29+
'**/cypress/**',
30+
'**/.{idea,git,cache,output,temp}/**',
31+
'**/*{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
32+
'**/*.config.js',
33+
'**/*.config.cjs',
34+
'**/*.config.ts',
35+
'**/*.d.ts',
36+
37+
'test/e2e/**',
38+
'public/**',
39+
'coverage/**',
40+
'.next/**',
41+
'.next-validation/**',
42+
'playwright-report/**',
43+
'test-results/**',
44+
45+
'vitest.setup.ts',
46+
'app/api/auth/[...nextauth]/route.ts',
47+
'lib/__mocks__/**',
48+
'**/__generated__/**',
49+
],
2350
},
2451
},
2552
});

0 commit comments

Comments
 (0)