diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-05-26 13:58:07 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-05-26 13:58:07 +0200 |
commit | fc6cf6169868e60c189e4b243330c3717ff159f3 (patch) | |
tree | 3f6dea9c1420e23756257b5abea27ec9ed92d58a /overlays/spm/frontend/src/test.ts | |
parent | 84f2affd66a0ff3947b91a30308cb8e6a8ff7594 (diff) | |
download | nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.gz nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.bz2 nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.xz nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.zip |
...
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); | ||