2021-04-15 14:13:46 +00:00
|
|
|
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
|
|
|
2021-05-14 09:12:24 +00:00
|
|
|
import 'zone.js/testing';
|
2021-04-15 14:13:46 +00:00
|
|
|
import { getTestBed } from '@angular/core/testing';
|
|
|
|
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
|
|
|
|
|
|
declare const require: {
|
|
|
|
context(path: string, deep?: boolean, filter?: RegExp): {
|
|
|
|
keys(): string[];
|
|
|
|
<T>(id: string): T;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
// First, initialize the Angular testing environment.
|
|
|
|
getTestBed().initTestEnvironment(
|
|
|
|
BrowserDynamicTestingModule,
|
2021-08-11 19:25:15 +00:00
|
|
|
platformBrowserDynamicTesting(),
|
2021-04-15 14:13:46 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
// Then we find all the tests.
|
|
|
|
const context = require.context('./', true, /\.spec\.ts$/);
|
|
|
|
|
|
|
|
// And load the modules.
|
|
|
|
context.keys().map(context);
|