blob: a951bdffccd324620489b51674295ecbf2a59a5f [file] [log] [blame]
Sean Condond6f95bf2020-01-21 10:10:23 +00001/*
2 * Copyright 2020-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16// This file is required by karma.conf.js and loads recursively all the .spec and framework files
17
18import 'core-js/es7/reflect';
19import 'zone.js/dist/zone';
20import 'zone.js/dist/zone-testing';
21import { getTestBed } from '@angular/core/testing';
22import {
23 BrowserDynamicTestingModule,
24 platformBrowserDynamicTesting
25} from '@angular/platform-browser-dynamic/testing';
26
27declare const require: any;
28
29// First, initialize the Angular testing environment.
30getTestBed().initTestEnvironment(
31 BrowserDynamicTestingModule,
32 platformBrowserDynamicTesting()
33);
34// Then we find all the tests.
35const context = require.context('./', true, /\.spec\.ts$/);
36// And load the modules.
37context.keys().map(context);