summaryrefslogtreecommitdiff
path: root/overlays/spm/frontend/src/test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/spm/frontend/src/test.ts')
-rw-r--r--overlays/spm/frontend/src/test.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/overlays/spm/frontend/src/test.ts b/overlays/spm/frontend/src/test.ts
new file mode 100644
index 00000000..00025daf
--- /dev/null
+++ b/overlays/spm/frontend/src/test.ts
@@ -0,0 +1,26 @@
1// This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
3import 'zone.js/testing';
4import { getTestBed } from '@angular/core/testing';
5import {
6 BrowserDynamicTestingModule,
7 platformBrowserDynamicTesting
8} from '@angular/platform-browser-dynamic/testing';
9
10declare const require: {
11 context(path: string, deep?: boolean, filter?: RegExp): {
12 <T>(id: string): T;
13 keys(): string[];
14 };
15};
16
17// First, initialize the Angular testing environment.
18getTestBed().initTestEnvironment(
19 BrowserDynamicTestingModule,
20 platformBrowserDynamicTesting(),
21);
22
23// Then we find all the tests.
24const context = require.context('./', true, /\.spec\.ts$/);
25// And load the modules.
26context.keys().map(context);