11import type { BenchmarkUserOptions , ResolvedCoverageOptions , UserConfig } from './types'
22import { isCI } from './utils/env'
33
4- export const defaultInclude = [ '**/*. {test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx} ' ]
4+ export const defaultInclude = [ '**/__tests__/**/*.?(c|m)[jt]s?(x)' , '**/?(*.) {test,spec}.?(c|m)[jt]s?(x) ']
55export const defaultExclude = [ '**/node_modules/**' , '**/dist/**' , '**/cypress/**' , '**/.{idea,git,cache,output,temp}/**' , '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*' ]
66export const benchmarkConfigDefaults : Required < Omit < BenchmarkUserOptions , 'outputFile' > > = {
7- include : [ '**/*.{bench,benchmark}.{js,mjs,cjs,ts,mts,cts,jsx,tsx} ' ] ,
7+ include : [ '**/*.{bench,benchmark}.?(c|m)[jt]s?(x) ' ] ,
88 exclude : defaultExclude ,
99 includeSource : [ ] ,
1010 reporters : [ 'default' ] ,
@@ -13,16 +13,15 @@ export const benchmarkConfigDefaults: Required<Omit<BenchmarkUserOptions, 'outpu
1313const defaultCoverageExcludes = [
1414 'coverage/**' ,
1515 'dist/**' ,
16- 'packages/*/test{,s} /**' ,
16+ 'packages/*/test?(s) /**' ,
1717 '**/*.d.ts' ,
1818 'cypress/**' ,
19- 'test{,s}/**' ,
20- 'test{,-*}.{js,cjs,mjs,ts,tsx,jsx}' ,
21- '**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}' ,
22- '**/*{.,-}spec.{js,cjs,mjs,ts,tsx,jsx}' ,
19+ 'test?(s)/**' ,
20+ 'test?(-*).?(c|m)[jt]s?(x)' ,
21+ '**/*{.,-}{test,spec}.?(c|m)[jt]s?(x)' ,
2322 '**/__tests__/**' ,
2423 '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*' ,
25- '**/.{eslint,mocha,prettier}rc.{js,cjs ,yml}' ,
24+ '**/.{eslint,mocha,prettier}rc.{?(c|m)js ,yml}' ,
2625]
2726
2827// These are the generic defaults for coverage. Providers may also set some provider specific defaults.
@@ -91,7 +90,7 @@ const config = {
9190 dangerouslyIgnoreUnhandledErrors : false ,
9291 typecheck : {
9392 checker : 'tsc' as const ,
94- include : [ '**/*. {test,spec}-d.{ts,js} ' ] ,
93+ include : [ '**/?(*.) {test,spec}-d.?(c|m)[jt]s?(x) ' ] ,
9594 exclude : defaultExclude ,
9695 } ,
9796 slowTestThreshold : 300 ,
0 commit comments