Calendar_Frontend/src/test.ts

24 lines
732 B
TypeScript
Raw Normal View History

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