UNPKG

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