Created
August 31, 2017 08:49
-
-
Save SergeyMell/a0ce4cee385ecf79f7dc79c3a731558a to your computer and use it in GitHub Desktop.
Angular 4 karma test configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'babel-polyfill/dist/polyfill.js'; | |
import 'zone.js/dist/zone.js'; | |
import 'zone.js/dist/long-stack-trace-zone'; | |
import 'zone.js/dist/proxy.js'; | |
import 'zone.js/dist/sync-test'; | |
import 'zone.js/dist/jasmine-patch'; | |
import 'zone.js/dist/async-test'; | |
import 'zone.js/dist/fake-async-test'; | |
import { getTestBed } from '@angular/core/testing'; | |
import { | |
BrowserDynamicTestingModule, | |
platformBrowserDynamicTesting | |
} from '@angular/platform-browser-dynamic/testing'; | |
declare const __karma__: any; | |
declare const require: any; | |
__karma__.loaded = function () {}; | |
getTestBed().initTestEnvironment( | |
BrowserDynamicTestingModule, | |
platformBrowserDynamicTesting() | |
); | |
const context = require.context('./', true, /\.spec\.ts$/); | |
context.keys().map(context); | |
__karma__.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment