forked from vitejs/vite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
26 lines (24 loc) · 840 Bytes
/
jest.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// eslint-disable-next-line node/no-extraneous-import
import type { Config } from '@jest/types'
const config: Config.InitialOptions = {
preset: 'ts-jest',
testMatch: process.env.VITE_TEST_BUILD
? ['**/playground/**/*.spec.[jt]s?(x)']
: ['**/*.spec.[jt]s?(x)'],
testTimeout: process.env.CI ? 30000 : 10000,
globalSetup: './scripts/jestGlobalSetup.js',
globalTeardown: './scripts/jestGlobalTeardown.js',
testEnvironment: './scripts/jestEnv.js',
setupFilesAfterEnv: ['./scripts/jestPerTestSetup.ts'],
watchPathIgnorePatterns: ['<rootDir>/packages/temp'],
modulePathIgnorePatterns: ['<rootDir>/packages/temp'],
moduleNameMapper: {
testUtils: '<rootDir>/packages/playground/testUtils.ts'
},
globals: {
'ts-jest': {
tsconfig: './packages/playground/tsconfig.json'
}
}
}
export default config