forked from cerebral/overmind
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
36 lines (35 loc) · 1.16 KB
/
jest.config.js
File metadata and controls
36 lines (35 loc) · 1.16 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
const path = require('path')
module.exports = {
globals: {
'ts-jest': {
tsConfigFile: '<rootDir>/tsconfig.spec.json',
},
__TRANSFORM_HTML__: true,
},
collectCoverage: true,
preset: path.resolve('..', '..', '..', 'node_modules', 'jest-preset-angular'),
setupTestFrameworkScriptFile: '<rootDir>/setupJest.ts',
collectCoverageFrom: ['src/**/*.{t,j}s?(x)', '!src/**/*.d.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.(ts|js|html)$':
'<rootDir>/../../../node_modules/jest-preset-angular/preprocessor.js',
},
testPathIgnorePatterns: [
'/dist/',
'/es/',
'/lib/',
'<rootDir>/node_modules/',
],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
haste: {
// This option is needed or else globbing ignores <rootDir>/node_modules.
providesModuleNodeModules: ['overmind-angular'],
},
snapshotSerializers: [
'<rootDir>/../../../node_modules/jest-preset-angular/AngularSnapshotSerializer.js',
'<rootDir>/../../../node_modules/jest-preset-angular/HTMLCommentSerializer.js',
],
}