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