Change test from karma to jest and added tsconfig paths
This commit is contained in:
parent
50cb05d191
commit
275bd37552
22 changed files with 3467 additions and 724 deletions
15
jest.config.js
Normal file
15
jest.config.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
const { pathsToModuleNameMapper } = require('ts-jest/utils');
|
||||
const { compilerOptions } = require('./tsconfig');
|
||||
|
||||
module.exports = {
|
||||
preset: 'jest-preset-angular',
|
||||
roots: ['<rootDir>/src/'],
|
||||
testMatch: ['**/+(*.)+(spec).+(ts)'],
|
||||
setupFilesAfterEnv: ['<rootDir>/src/test.ts'],
|
||||
collectCoverage: true,
|
||||
coverageReporters: ['html'],
|
||||
coverageDirectory: 'coverage/my-app',
|
||||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, {
|
||||
prefix: '<rootDir>/'
|
||||
})
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue