diff options
Diffstat (limited to 'overlays/spm/frontend/src/test.ts')
-rw-r--r-- | overlays/spm/frontend/src/test.ts | 26 |
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 | |||
3 | import 'zone.js/testing'; | ||
4 | import { getTestBed } from '@angular/core/testing'; | ||
5 | import { | ||
6 | BrowserDynamicTestingModule, | ||
7 | platformBrowserDynamicTesting | ||
8 | } from '@angular/platform-browser-dynamic/testing'; | ||
9 | |||
10 | declare 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. | ||
18 | getTestBed().initTestEnvironment( | ||
19 | BrowserDynamicTestingModule, | ||
20 | platformBrowserDynamicTesting(), | ||
21 | ); | ||
22 | |||
23 | // Then we find all the tests. | ||
24 | const context = require.context('./', true, /\.spec\.ts$/); | ||
25 | // And load the modules. | ||
26 | context.keys().map(context); | ||