1 |
46812
|
stefanos.g
|
Error.stackTraceLimit = Infinity;
|
2 |
|
|
|
3 |
|
|
require('core-js/client/shim');
|
4 |
|
|
require('reflect-metadata');
|
5 |
|
|
|
6 |
|
|
require('ts-helpers');
|
7 |
|
|
|
8 |
|
|
require('zone.js/dist/zone');
|
9 |
|
|
require('zone.js/dist/long-stack-trace-zone');
|
10 |
|
|
require('zone.js/dist/proxy');
|
11 |
|
|
require('zone.js/dist/sync-test');
|
12 |
|
|
require('zone.js/dist/jasmine-patch');
|
13 |
|
|
require('zone.js/dist/async-test');
|
14 |
|
|
require('zone.js/dist/fake-async-test');
|
15 |
|
|
|
16 |
|
|
/*
|
17 |
|
|
Ok, this is kinda crazy. We can use the the context method on
|
18 |
|
|
require that webpack created in order to tell webpack
|
19 |
|
|
what files we actually want to require or import.
|
20 |
|
|
Below, context will be a function/object with file names as keys.
|
21 |
|
|
using that regex we are saying look in client/app and find
|
22 |
|
|
any file that ends with '.spec.ts' and get its path. By passing in true
|
23 |
|
|
we say do this recursively
|
24 |
|
|
*/
|
25 |
|
|
var appContext = require.context('./src', true, /\.spec\.ts/);
|
26 |
|
|
|
27 |
|
|
// get all the files, for each file, call the context function
|
28 |
|
|
// that will require the file and load it up here. Context will
|
29 |
|
|
// loop and require those spec files here
|
30 |
|
|
appContext.keys().forEach(appContext);
|
31 |
|
|
|
32 |
|
|
// Select BrowserDomAdapter.
|
33 |
|
|
// see https://github.com/AngularClass/angular2-webpack-starter/issues/124
|
34 |
|
|
// Somewhere in the test setup
|
35 |
|
|
var testing = require('@angular/core/testing');
|
36 |
|
|
var browser = require('@angular/platform-browser-dynamic/testing');
|
37 |
|
|
|
38 |
|
|
testing.TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());
|