-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathjest.config.js
More file actions
33 lines (31 loc) · 867 Bytes
/
jest.config.js
File metadata and controls
33 lines (31 loc) · 867 Bytes
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
/** @type {import('jest').Config} */
const config = {
transform: {
'^.+\\.(t|j)sx?$': [
'ts-jest',
{
useESM: true,
},
],
'^.+\\.html$': '<rootDir>/scripts/transforms/text.js',
'^.+\\.svg$': '<rootDir>/scripts/transforms/text.js',
},
testMatch: ['**/__tests__/**/*.(spec|test).[jt]s?(x)'],
testPathIgnorePatterns: [
'<rootDir>/build/',
'<rootDir>/dist/',
'<rootDir>/node_modules/',
],
'//': 'https://github.com/remarkjs/remark/issues/969',
transformIgnorePatterns: [],
collectCoverageFrom: ['src/**/*.{ts,js}'],
coveragePathIgnorePatterns: ['/node_modules/'],
moduleNameMapper: {
'@/(.*)$': '<rootDir>/src/$1',
},
setupFilesAfterEnv: ['<rootDir>/scripts/jest-setup.js'],
};
if (process.env.CI) {
config.reporters = [['summary', { summaryThreshold: 1 }]];
}
module.exports = config;