cic-staff-client/src/test.ts

27 lines
764 B
TypeScript
Raw Permalink Normal View History

2020-10-30 16:16:05 +01: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';
import {
BrowserDynamicTestingModule,
2021-06-15 18:37:33 +02:00
platformBrowserDynamicTesting,
2020-10-30 16:16:05 +01:00
} from '@angular/platform-browser-dynamic/testing';
declare const require: {
2021-06-15 18:37:33 +02:00
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
2020-10-30 16:16:05 +01:00
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
2021-06-15 18:37:33 +02:00
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
2020-10-30 16:16:05 +01:00
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);