-
Notifications
You must be signed in to change notification settings - Fork 3
/
jest.config.js
38 lines (37 loc) · 1011 Bytes
/
jest.config.js
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
27
28
29
30
31
32
33
34
35
36
37
38
const customJestConfig = {
// projects: ['<rootDir>/src/__tests__/**'],
projects: ['<rootDir>/src/__tests__/database', '<rootDir>/src/__tests__/api'],
setupFilesAfterEnv: ['<rootDir>/jestSetup.ts'],
moduleDirectories: ['node_modules', '<rootDir>/src'],
// testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'],
// transform: {
// '^.+\\.(js|jsx|ts|tsx)$': '<rootDir>/node_modules/babel-jest'
// },
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
],
globals: {
__DEV__: false,
__VERSION__: 'jest-version',
__BUILD_DATE__: 'jest-build-date',
__COMMIT_SHA__: 'jest-commit-sha'
},
collectCoverageFrom: [
'./src/**',
'!./src/index.ts',
'!./src/types.ts',
'!./src/**.d.ts',
'!./src/__tests__/**',
'!./src/__fixtures__/**'
],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
}
}
}
module.exports = customJestConfig