You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mediarepo/mediarepo-ui/src/test.ts

28 lines
793 B
TypeScript

3 years ago
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import "zone.js/testing";
import {getTestBed} from "@angular/core/testing";
3 years ago
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from "@angular/platform-browser-dynamic/testing";
3 years ago
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,
platformBrowserDynamicTesting(),
{teardown: {destroyAfterEach: true}},
3 years ago
);
// Then we find all the tests.
const context = require.context("./", true, /\.spec\.ts$/);
3 years ago
// And load the modules.
context.keys().map(context);