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