diff --git a/public/docs/_examples/karma-test-shim.js b/public/docs/_examples/karma-test-shim.js index ec50e1ff66..5fb73d0301 100644 --- a/public/docs/_examples/karma-test-shim.js +++ b/public/docs/_examples/karma-test-shim.js @@ -28,22 +28,18 @@ System.config({ }); System.import('systemjs.config.js') - .then(function () { - return Promise.all([ + .then(() => Promise.all([ System.import('@angular/core/testing'), System.import('@angular/platform-browser-dynamic/testing') - ]) + ])) + .then((providers) => { + var coreTesting = providers[0]; + var browserTesting = providers[1]; + coreTesting.TestBed.initTestEnvironment( + browserTesting.BrowserDynamicTestingModule, + browserTesting.platformBrowserDynamicTesting()); }) - .then(function (providers) { - var testing = providers[0]; - var testingBrowser = providers[1]; - - testing.setBaseTestProviders( - testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, - testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS); - - }) - .then(function() { + .then(function () { // Finally, load all spec files. // This will run the tests directly. return Promise.all( diff --git a/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/karma-test-shim.1.js b/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/karma-test-shim.1.js index bf17063954..31589119d2 100644 --- a/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/karma-test-shim.1.js +++ b/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/karma-test-shim.1.js @@ -29,22 +29,18 @@ System.config({ }); System.import('systemjs.config.js') - .then(function () { - return Promise.all([ + .then(() => Promise.all([ System.import('@angular/core/testing'), System.import('@angular/platform-browser-dynamic/testing') - ]) + ])) + .then((providers) => { + var coreTesting = providers[0]; + var browserTesting = providers[1]; + coreTesting.TestBed.initTestEnvironment( + browserTesting.BrowserDynamicTestingModule, + browserTesting.platformBrowserDynamicTesting()); }) - .then(function (providers) { - var testing = providers[0]; - var testingBrowser = providers[1]; - - testing.setBaseTestProviders( - testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, - testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS); - - }) - .then(function() { + .then(function () { // Finally, load all spec files. // This will run the tests directly. return Promise.all( diff --git a/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/karma.conf.ng1.js b/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/karma.conf.ng1.js index 7156e025ce..48cc490f89 100644 --- a/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/karma.conf.ng1.js +++ b/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/karma.conf.ng1.js @@ -19,10 +19,13 @@ module.exports = function(config) { // Polyfills 'node_modules/core-js/client/shim.js', - - // Reflect and Zone.js 'node_modules/reflect-metadata/Reflect.js', + + // zone.js 'node_modules/zone.js/dist/zone.js', + 'node_modules/zone.js/dist/long-stack-trace-zone.js', + 'node_modules/zone.js/dist/proxy.js', + 'node_modules/zone.js/dist/sync-test.js', 'node_modules/zone.js/dist/jasmine-patch.js', 'node_modules/zone.js/dist/async-test.js', 'node_modules/zone.js/dist/fake-async-test.js', diff --git a/public/docs/_examples/upgrade-phonecat-3-final/ts/karma.conf.ng1.js b/public/docs/_examples/upgrade-phonecat-3-final/ts/karma.conf.ng1.js index 7156e025ce..48cc490f89 100644 --- a/public/docs/_examples/upgrade-phonecat-3-final/ts/karma.conf.ng1.js +++ b/public/docs/_examples/upgrade-phonecat-3-final/ts/karma.conf.ng1.js @@ -19,10 +19,13 @@ module.exports = function(config) { // Polyfills 'node_modules/core-js/client/shim.js', - - // Reflect and Zone.js 'node_modules/reflect-metadata/Reflect.js', + + // zone.js 'node_modules/zone.js/dist/zone.js', + 'node_modules/zone.js/dist/long-stack-trace-zone.js', + 'node_modules/zone.js/dist/proxy.js', + 'node_modules/zone.js/dist/sync-test.js', 'node_modules/zone.js/dist/jasmine-patch.js', 'node_modules/zone.js/dist/async-test.js', 'node_modules/zone.js/dist/fake-async-test.js', diff --git a/public/docs/_examples/webpack/ts/config/karma-test-shim.js b/public/docs/_examples/webpack/ts/config/karma-test-shim.js index 2a6b7f363c..973543a02a 100644 --- a/public/docs/_examples/webpack/ts/config/karma-test-shim.js +++ b/public/docs/_examples/webpack/ts/config/karma-test-shim.js @@ -5,10 +5,12 @@ require('core-js/es6'); require('reflect-metadata'); require('zone.js/dist/zone'); +require('zone.js/dist/long-stack-trace-zone'); +require('zone.js/dist/proxy'); +require('zone.js/dist/sync-test'); +require('zone.js/dist/jasmine-patch'); require('zone.js/dist/async-test'); require('zone.js/dist/fake-async-test'); -require('zone.js/dist/sync-test'); -require('zone.js/dist/proxy-zone'); var appContext = require.context('../src', true, /\.spec\.ts/);