Skip to content

Commit

Permalink
test: extend default coverage.exclude (#2079)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Swithinbank <[email protected]>
  • Loading branch information
AriPerkkio and delucis committed Jul 3, 2024
1 parent 4fe62f9 commit a96d3e8
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions packages/starlight/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
import { defineConfig } from 'vitest/config';

// Copy of https://github.com/vitest-dev/vitest/blob/8693449b412743f20a63fd9bfa1a9054aa74613f/packages/vitest/src/defaults.ts#L13C1-L26C1
const defaultCoverageExcludes = [
'coverage/**',
'dist/**',
'packages/*/test?(s)/**',
'**/*.d.ts',
'cypress/**',
'test?(s)/**',
'test?(-*).?(c|m)[jt]s?(x)',
'**/*{.,-}{test,spec}.?(c|m)[jt]s?(x)',
'**/__tests__/**',
'**/__e2e__/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,playwright}.config.*',
'**/.{eslint,mocha,prettier}rc.{?(c|m)js,yml}',
];
import { coverageConfigDefaults, defineConfig } from 'vitest/config';

export default defineConfig({
test: {
coverage: {
all: true,
reportsDirectory: './__coverage__',
exclude: [
...defaultCoverageExcludes,
...coverageConfigDefaults.exclude,
'**/__e2e__/**',
'playwright.config.*',
'**/vitest.*',
'components.ts',
'types.ts',
Expand Down

0 comments on commit a96d3e8

Please sign in to comment.