Adjust preset
This commit is contained in:
Родитель
498d5e8009
Коммит
dd44ca092f
|
@ -0,0 +1 @@
|
|||
node_modules
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
setupJest: require('./setupJest.js')
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
"environments/(.*)": "<rootDir>/src/environments/$1"
|
||||
},
|
||||
"setupFiles": [
|
||||
"<rootDir>/node_modules/jest-preset-angular/setupJest.ts"
|
||||
"<rootDir>/node_modules/jest-preset-angular/setupJest.js"
|
||||
],
|
||||
"transformIgnorePatterns": [
|
||||
"node_modules/(?!@ngrx)"
|
||||
|
|
|
@ -5,5 +5,9 @@
|
|||
"main": "jest-preset.json",
|
||||
"repository": "git@github.com:thymikee/jest-preset-angular.git",
|
||||
"author": "Michał Pierzchała <thymikee@gmail.com>",
|
||||
"license": "BSD-3"
|
||||
"license": "BSD-3",
|
||||
"dependencies": {
|
||||
"jest-zone-patch": "^0.0.5",
|
||||
"ts-jest": "^19.0.6"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
require('core-js/es6/reflect');
|
||||
require('core-js/es7/reflect');
|
||||
require('zone.js');
|
||||
require('zone.js/dist/proxy.js');
|
||||
require('zone.js/dist/sync-test');
|
||||
require('zone.js/dist/async-test');
|
||||
require('zone.js/dist/fake-async-test');
|
||||
require('rxjs');
|
||||
require('jest-zone-patch');
|
||||
const { getTestBed } = require('@angular/core/testing');
|
||||
const {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} = require('@angular/platform-browser-dynamic/testing');
|
||||
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
19
setupJest.ts
19
setupJest.ts
|
@ -1,19 +0,0 @@
|
|||
import 'core-js/es6/reflect';
|
||||
import 'core-js/es7/reflect';
|
||||
import 'zone.js';
|
||||
import 'zone.js/dist/proxy.js';
|
||||
import 'zone.js/dist/sync-test';
|
||||
import 'zone.js/dist/async-test';
|
||||
import 'zone.js/dist/fake-async-test';
|
||||
import 'rxjs';
|
||||
import 'jest-zone-patch';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче