-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathjest.config.js
More file actions
46 lines (46 loc) · 1.32 KB
/
Copy pathjest.config.js
File metadata and controls
46 lines (46 loc) · 1.32 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
43
44
45
46
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/test', '<rootDir>/src'],
testMatch: ['**/*.test.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*.d.ts',
'!src/main.tsx',
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html', 'json-summary'],
coverageThreshold: {
global: {
lines: 16,
branches: 12,
functions: 10,
statements: 15,
},
},
moduleNameMapper: {
'^obsidian$': '<rootDir>/test/mocks/obsidian.ts',
'^src/components/(.*)$': '<rootDir>/test/mocks/components.ts',
'^src/hooks/(.*)$': '<rootDir>/test/mocks/hooks.ts',
'^src/(.*)$': '<rootDir>/src/$1',
'^react$': '<rootDir>/test/mocks/react.ts',
'^react/jsx-runtime$': '<rootDir>/test/mocks/react-jsx-runtime.ts',
'^react-dom$': '<rootDir>/test/mocks/react-dom.ts',
'^reactflow$': '<rootDir>/test/mocks/reactflow.ts',
'^lucide-react$': '<rootDir>/test/mocks/lucide-react.ts',
'^react-select/creatable$': '<rootDir>/test/mocks/react-select.ts',
},
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: {
esModuleInterop: true,
allowSyntheticDefaultImports: true,
rootDir: '.',
},
},
],
},
};