This repository was archived by the owner on Mar 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
upgrade-phonecat-2-hybrid/ts
upgrade-phonecat-3-final/ts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,22 +28,18 @@ System.config({
2828} ) ;
2929
3030System . import ( 'systemjs.config.js' )
31- . then ( function ( ) {
32- return Promise . all ( [
31+ . then ( ( ) => Promise . all ( [
3332 System . import ( '@angular/core/testing' ) ,
3433 System . import ( '@angular/platform-browser-dynamic/testing' )
35- ] )
34+ ] ) )
35+ . then ( ( providers ) => {
36+ var coreTesting = providers [ 0 ] ;
37+ var browserTesting = providers [ 1 ] ;
38+ coreTesting . TestBed . initTestEnvironment (
39+ browserTesting . BrowserDynamicTestingModule ,
40+ browserTesting . platformBrowserDynamicTesting ( ) ) ;
3641 } )
37- . then ( function ( providers ) {
38- var testing = providers [ 0 ] ;
39- var testingBrowser = providers [ 1 ] ;
40-
41- testing . setBaseTestProviders (
42- testingBrowser . TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS ,
43- testingBrowser . TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS ) ;
44-
45- } )
46- . then ( function ( ) {
42+ . then ( function ( ) {
4743 // Finally, load all spec files.
4844 // This will run the tests directly.
4945 return Promise . all (
Original file line number Diff line number Diff line change @@ -29,22 +29,18 @@ System.config({
2929} ) ;
3030
3131System . import ( 'systemjs.config.js' )
32- . then ( function ( ) {
33- return Promise . all ( [
32+ . then ( ( ) => Promise . all ( [
3433 System . import ( '@angular/core/testing' ) ,
3534 System . import ( '@angular/platform-browser-dynamic/testing' )
36- ] )
35+ ] ) )
36+ . then ( ( providers ) => {
37+ var coreTesting = providers [ 0 ] ;
38+ var browserTesting = providers [ 1 ] ;
39+ coreTesting . TestBed . initTestEnvironment (
40+ browserTesting . BrowserDynamicTestingModule ,
41+ browserTesting . platformBrowserDynamicTesting ( ) ) ;
3742 } )
38- . then ( function ( providers ) {
39- var testing = providers [ 0 ] ;
40- var testingBrowser = providers [ 1 ] ;
41-
42- testing . setBaseTestProviders (
43- testingBrowser . TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS ,
44- testingBrowser . TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS ) ;
45-
46- } )
47- . then ( function ( ) {
43+ . then ( function ( ) {
4844 // Finally, load all spec files.
4945 // This will run the tests directly.
5046 return Promise . all (
Original file line number Diff line number Diff line change @@ -19,10 +19,13 @@ module.exports = function(config) {
1919
2020 // Polyfills
2121 'node_modules/core-js/client/shim.js' ,
22-
23- // Reflect and Zone.js
2422 'node_modules/reflect-metadata/Reflect.js' ,
23+
24+ // zone.js
2525 'node_modules/zone.js/dist/zone.js' ,
26+ 'node_modules/zone.js/dist/long-stack-trace-zone.js' ,
27+ 'node_modules/zone.js/dist/proxy.js' ,
28+ 'node_modules/zone.js/dist/sync-test.js' ,
2629 'node_modules/zone.js/dist/jasmine-patch.js' ,
2730 'node_modules/zone.js/dist/async-test.js' ,
2831 'node_modules/zone.js/dist/fake-async-test.js' ,
Original file line number Diff line number Diff line change @@ -19,10 +19,13 @@ module.exports = function(config) {
1919
2020 // Polyfills
2121 'node_modules/core-js/client/shim.js' ,
22-
23- // Reflect and Zone.js
2422 'node_modules/reflect-metadata/Reflect.js' ,
23+
24+ // zone.js
2525 'node_modules/zone.js/dist/zone.js' ,
26+ 'node_modules/zone.js/dist/long-stack-trace-zone.js' ,
27+ 'node_modules/zone.js/dist/proxy.js' ,
28+ 'node_modules/zone.js/dist/sync-test.js' ,
2629 'node_modules/zone.js/dist/jasmine-patch.js' ,
2730 'node_modules/zone.js/dist/async-test.js' ,
2831 'node_modules/zone.js/dist/fake-async-test.js' ,
Original file line number Diff line number Diff line change @@ -5,10 +5,12 @@ require('core-js/es6');
55require ( 'reflect-metadata' ) ;
66
77require ( 'zone.js/dist/zone' ) ;
8+ require ( 'zone.js/dist/long-stack-trace-zone' ) ;
9+ require ( 'zone.js/dist/proxy' ) ;
10+ require ( 'zone.js/dist/sync-test' ) ;
11+ require ( 'zone.js/dist/jasmine-patch' ) ;
812require ( 'zone.js/dist/async-test' ) ;
913require ( 'zone.js/dist/fake-async-test' ) ;
10- require ( 'zone.js/dist/sync-test' ) ;
11- require ( 'zone.js/dist/proxy-zone' ) ;
1214
1315var appContext = require . context ( '../src' , true , / \. s p e c \. t s / ) ;
1416
You can’t perform that action at this time.
0 commit comments