added svcapi ui and camunda code
[it/otf.git] / otf-frontend / client / src / test.ts
diff --git a/otf-frontend/client/src/test.ts b/otf-frontend/client/src/test.ts
new file mode 100644 (file)
index 0000000..34bfd28
--- /dev/null
@@ -0,0 +1,48 @@
+/*  Copyright (c) 2019 AT&T Intellectual Property.                             #\r
+#                                                                              #\r
+#   Licensed under the Apache License, Version 2.0 (the "License");            #\r
+#   you may not use this file except in compliance with the License.           #\r
+#   You may obtain a copy of the License at                                    #\r
+#                                                                              #\r
+#       http://www.apache.org/licenses/LICENSE-2.0                             #\r
+#                                                                              #\r
+#   Unless required by applicable law or agreed to in writing, software        #\r
+#   distributed under the License is distributed on an "AS IS" BASIS,          #\r
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
+#   See the License for the specific language governing permissions and        #\r
+#   limitations under the License.                                             #\r
+##############################################################################*/\r
+\r
+\r
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files\r
+\r
+import 'zone.js/dist/long-stack-trace-zone';\r
+import 'zone.js/dist/proxy.js';\r
+import 'zone.js/dist/sync-test';\r
+import 'zone.js/dist/jasmine-patch';\r
+import 'zone.js/dist/async-test';\r
+import 'zone.js/dist/fake-async-test';\r
+import { getTestBed } from '@angular/core/testing';\r
+import {\r
+  BrowserDynamicTestingModule,\r
+  platformBrowserDynamicTesting\r
+} from '@angular/platform-browser-dynamic/testing';\r
+\r
+// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.\r
+declare const __karma__: any;\r
+declare const require: any;\r
+\r
+// Prevent Karma from running prematurely.\r
+__karma__.loaded = function () {};\r
+\r
+// First, initialize the Angular testing environment.\r
+getTestBed().initTestEnvironment(\r
+  BrowserDynamicTestingModule,\r
+  platformBrowserDynamicTesting()\r
+);\r
+// Then we find all the tests.\r
+const context = require.context('./', true, /\.spec\.ts$/);\r
+// And load the modules.\r
+context.keys().map(context);\r
+// Finally, start Karma to run the tests.\r
+__karma__.start();\r