blob: 16317897b1c50a3a71bc775a8d6429f2b4c6cf98 [file] [log] [blame]
Sean Condon83fc39f2018-04-19 18:56:13 +01001// This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
3import 'zone.js/dist/zone-testing';
4import { getTestBed } from '@angular/core/testing';
5import {
6 BrowserDynamicTestingModule,
7 platformBrowserDynamicTesting
8} from '@angular/platform-browser-dynamic/testing';
9
10declare const require: any;
11
12// First, initialize the Angular testing environment.
13getTestBed().initTestEnvironment(
14 BrowserDynamicTestingModule,
15 platformBrowserDynamicTesting()
16);
17// Then we find all the tests.
18const context = require.context('./', true, /\.spec\.ts$/);
19// And load the modules.
20context.keys().map(context);