-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbase.spec.ts
36 lines (28 loc) · 1.28 KB
/
base.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"use strict";
import "core-js/es";
import "core-js/proposals/reflect-metadata";
// IE polyfills
// See https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill
/* tslint:disable:no-unbound-method */
if (!Element.prototype.matches) {
Element.prototype.matches = (<any>Element.prototype).msMatchesSelector || Element.prototype.webkitMatchesSelector;
}
/* tslint:enable:no-unbound-method */
// See: https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach#Polyfill
if ((<any>window).NodeList && !NodeList.prototype.forEach) {
(<any>NodeList.prototype).forEach = Array.prototype.forEach;
}
/* tslint:disable:no-import-side-effect */
import "zone.js";
import "zone.js/testing";
import "zone.js/plugins/long-stack-trace-zone";
/* tslint:enable:no-import-side-effect */
// define global environment variable (used in some places in stark-core and stark-ui)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
globalThis["ENV"] = "development";
import { getTestBed } from "@angular/core/testing";
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from "@angular/platform-browser-dynamic/testing";
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
});