-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
42 lines (42 loc) · 1.03 KB
/
jest.config.js
File metadata and controls
42 lines (42 loc) · 1.03 KB
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
39
40
41
42
export default {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/*.test.ts', '**/*.test.tsx'],
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/ui/'],
transform: {
'^.+\\.(ts|tsx)$': ['ts-jest', {
useESM: true
}],
'^.+\\.(js|jsx)$': 'babel-jest'
},
transformIgnorePatterns: [
'node_modules/(?!(ink-testing-library)/)'
],
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*.d.ts',
'!src/**/*.test.{ts,tsx}',
'!src/**/types.ts',
'!src/tui/Menu.tsx'
],
coverageThreshold: {
global: {
branches: 95,
functions: 95,
lines: 95,
statements: 95
}
},
coveragePathIgnorePatterns: [
'/node_modules/',
'/dist/'
],
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^ink$': '<rootDir>/tests/__mocks__/ink.ts',
'^ink-testing-library$': '<rootDir>/tests/__mocks__/ink-testing-library.ts',
'^(\\.{1,2}/.*)\\.js$': '$1'
},
extensionsToTreatAsEsm: ['.ts', '.tsx']
};