source: trip-planner-front/node_modules/@schematics/angular/library/files/src/test.ts.template

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 806 bytes
Line 
1// This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
3import 'zone.js';
4import 'zone.js/testing';
5import { getTestBed } from '@angular/core/testing';
6import {
7 BrowserDynamicTestingModule,
8 platformBrowserDynamicTesting
9} from '@angular/platform-browser-dynamic/testing';
10
11declare const require: {
12 context(path: string, deep?: boolean, filter?: RegExp): {
13 keys(): string[];
14 <T>(id: string): T;
15 };
16};
17
18// First, initialize the Angular testing environment.
19getTestBed().initTestEnvironment(
20 BrowserDynamicTestingModule,
21 platformBrowserDynamicTesting(),
22 { teardown: { destroyAfterEach: true }},
23);
24
25// Then we find all the tests.
26const context = require.context('./', true, /\.spec\.ts$/);
27// And load the modules.
28context.keys().map(context);
Note: See TracBrowser for help on using the repository browser.