-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
36 lines (36 loc) · 1.06 KB
/
jest.config.js
File metadata and controls
36 lines (36 loc) · 1.06 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
/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
preset: 'ts-jest',
testEnvironment: 'jsdom',
roots: ['<rootDir>/src'],
moduleNameMapper: {
'^monaco-editor/esm/vs/editor/editor.api$': '<rootDir>/node_modules/monaco-editor/esm/vs/editor/editor.api.js',
'^monaco-editor$': '<rootDir>/node_modules/monaco-editor/esm/vs/editor/editor.api.js'
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testMatch: ['**/__tests__/**/*.test.ts', '**/__tests__/**/*.test.tsx'],
transform: {
'^.+\\.(ts|tsx)$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json',
diagnostics: {
ignoreCodes: [1343] // Ignore 'import not found' errors for monaco-editor
}
}
]
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov'],
coveragePathIgnorePatterns: [
'/node_modules/',
'/dist/',
'/__tests__/',
'/stories/'
],
transformIgnorePatterns: [
'node_modules/(?!(monaco-editor)/)'
]
};