1
1
import type { BenchmarkUserOptions , ResolvedCoverageOptions , UserConfig } from './types'
2
2
import { isCI } from './utils/env'
3
3
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) ']
5
5
export const defaultExclude = [ '**/node_modules/**' , '**/dist/**' , '**/cypress/**' , '**/.{idea,git,cache,output,temp}/**' , '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*' ]
6
6
export 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) ' ] ,
8
8
exclude : defaultExclude ,
9
9
includeSource : [ ] ,
10
10
reporters : [ 'default' ] ,
@@ -13,16 +13,15 @@ export const benchmarkConfigDefaults: Required<Omit<BenchmarkUserOptions, 'outpu
13
13
const defaultCoverageExcludes = [
14
14
'coverage/**' ,
15
15
'dist/**' ,
16
- 'packages/*/test{,s} /**' ,
16
+ 'packages/*/test?(s) /**' ,
17
17
'**/*.d.ts' ,
18
18
'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)' ,
23
22
'**/__tests__/**' ,
24
23
'**/{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}' ,
26
25
]
27
26
28
27
// These are the generic defaults for coverage. Providers may also set some provider specific defaults.
@@ -91,7 +90,7 @@ const config = {
91
90
dangerouslyIgnoreUnhandledErrors : false ,
92
91
typecheck : {
93
92
checker : 'tsc' as const ,
94
- include : [ '**/*. {test,spec}-d.{ts,js} ' ] ,
93
+ include : [ '**/?(*.) {test,spec}-d.?(c|m)[jt]s?(x) ' ] ,
95
94
exclude : defaultExclude ,
96
95
} ,
97
96
slowTestThreshold : 300 ,
0 commit comments