summaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/test.ts
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2019-06-18 16:30:14 +0530
committerArundathi Patil <arundpil@in.ibm.com>2019-06-18 16:30:27 +0530
commitab4890bab82458f40d71742c6faf81631fe8a756 (patch)
treeb24613efcead4d4958814d5352d227bb19b0714f /cds-ui/client/src/test.ts
parent39167cccae3271603819aa39c6476e434c759533 (diff)
Added test.ts file
Added test.ts file required to run the unit test cases. Acts as entry point. Issue-ID: CCSDK-1411 Change-Id: I96d18f49f23d7ec192e415ee7941b371c1f6d624 Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'cds-ui/client/src/test.ts')
-rw-r--r--cds-ui/client/src/test.ts41
1 files changed, 41 insertions, 0 deletions
diff --git a/cds-ui/client/src/test.ts b/cds-ui/client/src/test.ts
new file mode 100644
index 000000000..d9ed820e1
--- /dev/null
+++ b/cds-ui/client/src/test.ts
@@ -0,0 +1,41 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2019 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
+
+import 'zone.js/dist/zone-testing';
+import { getTestBed } from '@angular/core/testing';
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting
+} from '@angular/platform-browser-dynamic/testing';
+
+declare const require: any;
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting()
+);
+// Then we find all the tests.
+const context = require.context('./', true, /\.spec\.ts$/);
+// And load the modules.
+context.keys().map(context);