summaryrefslogtreecommitdiff
path: root/overlays/spm/frontend/src/test.ts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-05-26 13:58:07 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-05-26 13:58:07 +0200
commitfc6cf6169868e60c189e4b243330c3717ff159f3 (patch)
tree3f6dea9c1420e23756257b5abea27ec9ed92d58a /overlays/spm/frontend/src/test.ts
parent84f2affd66a0ff3947b91a30308cb8e6a8ff7594 (diff)
downloadnixos-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.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);