-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
25 lines (24 loc) · 704 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
const transformTSPaths = require('./transformTSPaths');
const jestTransforms = require('transform-ts-paths').jestTransforms;
const moduleNameMapper = Object.assign({}, transformTSPaths(
jestTransforms.alias,
jestTransforms.path
));
module.exports = {
transform: {
'.(ts|tsx)': 'ts-jest'
},
verbose: true,
testEnvironment: 'jsdom',
testRegex: 'src/((.+/)?__tests__/.*|.*\\.(test|spec))\\.(ts|tsx|js)$',
testPathIgnorePatterns: ['\\.d\\.ts$'],
moduleFileExtensions: [
'ts',
'tsx',
'js'
],
moduleNameMapper: moduleNameMapper,
watchPathIgnorePatterns: ['/node_modules/', '/dist/'],
setupFiles: ['./jest-setup.ts'],
setupFilesAfterEnv: ['./jest-post-setup.ts'],
};