forked from moodlehq/moodleapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
25 lines (24 loc) · 761 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 { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig');
module.exports = {
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/src/testing/setup.ts'],
testMatch: ['**/?(*.)test.ts'],
collectCoverageFrom: [
'src/**/*.{ts,html}',
'!src/testing/**/*',
],
transform: {
'^.+\\.(ts|html)$': 'ts-jest',
},
transformIgnorePatterns: ['node_modules/(?!@ionic-native|@ionic)'],
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/src/' }),
'^!raw-loader!.*': 'jest-raw-loader',
},
globals: {
'ts-jest': {
tsConfig: './tsconfig.test.json',
},
},
};