22Error . stackTraceLimit = Infinity ;
33jasmine . DEFAULT_TIMEOUT_INTERVAL = 10000 ;
44
5- __karma__ . loaded = function ( ) {
6- } ;
7-
8-
9- function isJsFile ( path ) {
10- return path . slice ( - 3 ) == '.js' ;
11- }
12-
13- function isSpecFile ( path ) {
14- return path . slice ( - 7 ) == 'spec.js' ;
15- }
16-
17- function isBuiltFile ( path ) {
18- var builtPath = '/base/dist/' ;
19- return isJsFile ( path ) && ( path . substr ( 0 , builtPath . length ) == builtPath ) ;
20- }
21-
22- var allSpecFiles = Object . keys ( window . __karma__ . files )
23- . filter ( isSpecFile )
24- . filter ( isBuiltFile ) ;
25-
26- // Load our SystemJS configuration.
27- System . config ( {
28- baseURL : '/base'
29- } ) ;
30-
31- System . config (
32- {
33- paths : {
34- // paths serve as alias
35- 'npm:' : 'node_modules/'
36- } ,
37- map : {
38- 'app' : 'dist' ,
39- '@angular/core' : 'npm:@angular/core/bundles/core.umd.js' ,
40- '@angular/common' : 'npm:@angular/common/bundles/common.umd.js' ,
41- '@angular/compiler' : 'npm:@angular/compiler/bundles/compiler.umd.js' ,
42- '@angular/platform-browser' : 'npm:@angular/platform-browser/bundles/platform-browser.umd.js' ,
43- '@angular/platform-browser-dynamic' : 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js' ,
44-
45- // angular testing umd bundles
46- '@angular/core/testing' : 'npm:@angular/core/bundles/core-testing.umd.js' ,
47- '@angular/common/testing' : 'npm:@angular/common/bundles/common-testing.umd.js' ,
48- '@angular/compiler/testing' : 'npm:@angular/compiler/bundles/compiler-testing.umd.js' ,
49- '@angular/platform-browser/testing' : 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js' ,
50- '@angular/platform-browser-dynamic/testing' : 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js' ,
51-
52- // other libraries
53- 'rxjs' : 'npm:rxjs' ,
54- 'firebase' : 'npm:firebase/firebase.js'
55- } ,
56- packages : {
57- 'app' : {
58- defaultExtension : 'js'
59- } ,
60- 'rxjs' : {
61- main : 'Rx.js' ,
62- defaultExtension : 'js'
63- }
64- }
65- } ) ;
66-
67- Promise . all ( [
68- System . import ( '@angular/core/testing' ) ,
69- System . import ( '@angular/platform-browser-dynamic/testing' )
70- ] ) . then ( function ( providers ) {
71- var testing = providers [ 0 ] ;
72- var testingBrowser = providers [ 1 ] ;
73-
74- testing . TestBed . initTestEnvironment (
75- testingBrowser . BrowserDynamicTestingModule ,
76- testingBrowser . platformBrowserDynamicTesting ( )
77- ) ;
78-
79- } ) . then ( function ( ) {
80- // Finally, load all spec files.
81- // This will run the tests directly.
82- return Promise . all (
83- allSpecFiles . map ( function ( moduleName ) {
84- return System . import ( moduleName ) ;
85- } ) ) ;
86- } ) . then ( __karma__ . start , __karma__ . error ) ;
5+ ng . core . testing . TestBed . initTestEnvironment (
6+ ng . platformBrowserDynamic . testing . BrowserDynamicTestingModule ,
7+ ng . platformBrowserDynamic . testing . platformBrowserDynamicTesting ( )
8+ ) ;
0 commit comments