cavallium-website/src/test.ts

21 lines
642 B
TypeScript
Raw Permalink Normal View History

2019-04-11 19:57:39 +02:00
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
2019-04-12 20:20:38 +02:00
import "zone.js/dist/zone-testing";
import { getTestBed } from "@angular/core/testing";
2019-04-11 19:57:39 +02:00
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
2019-04-12 20:20:38 +02:00
} from "@angular/platform-browser-dynamic/testing";
2019-04-11 19:57:39 +02:00
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
2019-04-12 20:20:38 +02:00
const context = require.context("./", true, /\.spec\.ts$/);
2019-04-11 19:57:39 +02:00
// And load the modules.
context.keys().map(context);