| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2020 TATA ELXSI |
| 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 | Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | */ |
| 18 | /** |
| 19 | * @file This file is required by karma.conf.js and loads recursively all the .spec and framework files. |
| 20 | */ |
| 21 | import { getTestBed } from '@angular/core/testing'; |
| 22 | import { |
| 23 | BrowserDynamicTestingModule, |
| 24 | platformBrowserDynamicTesting |
| 25 | } from '@angular/platform-browser-dynamic/testing'; |
| 26 | import 'zone.js/dist/zone-testing'; |
| 27 | |
| 28 | /** const variable require */ |
| 29 | // tslint:disable:no-reserved-keywords |
| 30 | // tslint:disable-next-line:no-any |
| 31 | declare const require: any; |
| 32 | |
| 33 | // First, initialize the Angular testing environment. |
| 34 | getTestBed().initTestEnvironment( |
| 35 | BrowserDynamicTestingModule, |
| 36 | platformBrowserDynamicTesting() |
| 37 | ); |
| 38 | |
| 39 | /** const variable context */ |
| 40 | // Then we find all the tests. |
| 41 | // tslint:disable-next-line:typedef |
| 42 | const context = require.context('./', true, /\.spec\.ts$/); |
| 43 | // And load the modules. |
| 44 | context.keys().map(context); |