[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

fix(coverage): exclude `*.test-d.*` by default (#5634)

authored by

MindfulPol and committed by
GitHub
(Apr 30, 2024, 7:50 PM +0300) bfe8ad9d 7d57c116

+8 -3
+1 -1
docs/config/index.md
··· 1102 1102 'cypress/**', 1103 1103 'test?(s)/**', 1104 1104 'test?(-*).?(c|m)[jt]s?(x)', 1105 - '**/*{.,-}{test,spec}.?(c|m)[jt]s?(x)', 1105 + '**/*{.,-}{test,spec}?(-d).?(c|m)[jt]s?(x)', 1106 1106 '**/__tests__/**', 1107 1107 '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*', 1108 1108 '**/vitest.{workspace,projects}.[jt]s?(on)',
+1 -1
packages/vitest/src/defaults.ts
··· 23 23 'cypress/**', 24 24 'test?(s)/**', 25 25 'test?(-*).?(c|m)[jt]s?(x)', 26 - '**/*{.,-}{test,spec}.?(c|m)[jt]s?(x)', 26 + '**/*{.,-}{test,spec}?(-d).?(c|m)[jt]s?(x)', 27 27 '**/__tests__/**', 28 28 '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*', 29 29 '**/vitest.{workspace,projects}.[jt]s?(on)',
+5
test/coverage-test/src/should-be-excluded-from-report.test-d.ts
··· 1 + // This file should be excluded from coverage report 2 + 3 + export function uncoveredFile() { 4 + return 0 5 + }
+1 -1
packages/vitest/src/types/coverage.ts
··· 121 121 /** 122 122 * List of files excluded from coverage as glob patterns 123 123 * 124 - * @default ['coverage/**', 'dist/**', '**\/[.]**', 'packages/*\/test?(s)/**', '**\/*.d.ts', '**\/virtual:*', '**\/__x00__*', '**\/\x00*', 'cypress/**', 'test?(s)/**', 'test?(-*).?(c|m)[jt]s?(x)', '**\/*{.,-}{test,spec}.?(c|m)[jt]s?(x)', '**\/__tests__/**', '**\/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*', '**\/vitest.{workspace,projects}.[jt]s?(on)', '**\/.{eslint,mocha,prettier}rc.{?(c|m)js,yml}'] 124 + * @default ['coverage/**', 'dist/**', '**\/[.]**', 'packages/*\/test?(s)/**', '**\/*.d.ts', '**\/virtual:*', '**\/__x00__*', '**\/\x00*', 'cypress/**', 'test?(s)/**', 'test?(-*).?(c|m)[jt]s?(x)', '**\/*{.,-}{test,spec}?(-d).?(c|m)[jt]s?(x)', '**\/__tests__/**', '**\/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*', '**\/vitest.{workspace,projects}.[jt]s?(on)', '**\/.{eslint,mocha,prettier}rc.{?(c|m)js,yml}'] 125 125 */ 126 126 exclude?: string[] 127 127