blob: e5cdb59ad0547109224126587f1f83d8a53967c0 [file] [log] [blame]
Skip Wonnell2c977e22018-03-01 08:30:15 -06001// This file is required by karma.conf.js and loads recursively all the .spec and framework files
2/*
3============LICENSE_START==========================================
4===================================================================
5Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
6===================================================================
7
8Unless otherwise specified, all software contained herein is licensed
9under the Apache License, Version 2.0 (the License);
10you may not use this software except in compliance with the License.
11You may obtain a copy of the License at
12
13 http://www.apache.org/licenses/LICENSE-2.0
14
15Unless required by applicable law or agreed to in writing, software
16distributed under the License is distributed on an "AS IS" BASIS,
17WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18See the License for the specific language governing permissions and
19limitations under the License.
20
21ECOMP is a trademark and service mark of AT&T Intellectual Property.
22============LICENSE_END============================================
23*/
24
25import 'zone.js/dist/long-stack-trace-zone';
26import 'zone.js/dist/proxy.js';
27import 'zone.js/dist/sync-test';
28import 'zone.js/dist/jasmine-patch';
29import 'zone.js/dist/async-test';
30import 'zone.js/dist/fake-async-test';
31
32import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';
33
34import {getTestBed} from '@angular/core/testing';
35
36// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
37declare const __karma__: any;
38declare const require: any;
39
40// Prevent Karma from running prematurely.
41__karma__.loaded = function () {
42};
43
44// First, initialize the Angular testing environment.
45getTestBed().initTestEnvironment(
46 BrowserDynamicTestingModule,
47 platformBrowserDynamicTesting()
48);
49// Then we find all the tests.
50const context = require.context('./app', true, /\.spec\.ts$/);
51// And load the modules.
52context.keys().map(context);
53// Finally, start Karma to run the tests.
54__karma__.start();