2018-06-13 18:34:10 +02:00
|
|
|
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
|
|
import 'zone.js/dist/zone-testing';
|
|
|
|
import { getTestBed } from '@angular/core/testing';
|
2018-06-19 16:55:50 +02:00
|
|
|
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
2018-06-13 18:34:10 +02:00
|
|
|
|
|
|
|
declare const require: any;
|
|
|
|
|
|
|
|
// First, initialize the Angular testing environment.
|
2018-06-19 16:55:50 +02:00
|
|
|
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
|
2018-06-13 18:34:10 +02:00
|
|
|
// Then we find all the tests.
|
|
|
|
const context = require.context('./', true, /\.spec\.ts$/);
|
|
|
|
// And load the modules.
|
|
|
|
context.keys().map(context);
|