-
Notifications
You must be signed in to change notification settings - Fork 23
/
jest.config.js
31 lines (29 loc) · 755 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
// @ts-check
/** @typedef {import('ts-jest').JestConfigWithTsJest} JestConfig */
/** @type {JestConfig} */
const config = {
collectCoverage: true,
coveragePathIgnorePatterns: ['<rootDir>/src/features/editor/examples/'],
moduleNameMapper: {
'^@/(.*)': '<rootDir>/src/$1',
'(.+)\\?raw$': '$1',
},
// TODO: remove once Jest supports Prettier version 3
prettierPath: null,
snapshotFormat: {
escapeString: true,
},
testEnvironment: 'jsdom',
testMatch: ['<rootDir>/__tests__/**/*.test.ts?(x)'],
transform: {
'\\.tsx?$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json',
isolatedModules: true,
},
],
'\\.asm$': '<rootDir>/__tests__/rawTransformer.js',
},
}
module.exports = config