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