Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit 460e207

Browse files
Foxandxsswardbell
authored andcommitted
chore: update karma to zone 0.6.15 (#2165)
* chore: update karma to zone 0.6.15 * chore: update karma to zone 0.6.16 (Ward's updates) * chore: add changes to karma-shim
1 parent 9f0ff2e commit 460e207

5 files changed

Lines changed: 32 additions & 32 deletions

File tree

public/docs/_examples/karma-test-shim.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,18 @@ System.config({
2828
});
2929

3030
System.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(

public/docs/_examples/upgrade-phonecat-2-hybrid/ts/karma-test-shim.1.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,18 @@ System.config({
2929
});
3030

3131
System.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(

public/docs/_examples/upgrade-phonecat-2-hybrid/ts/karma.conf.ng1.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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',

public/docs/_examples/upgrade-phonecat-3-final/ts/karma.conf.ng1.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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',

public/docs/_examples/webpack/ts/config/karma-test-shim.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ require('core-js/es6');
55
require('reflect-metadata');
66

77
require('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');
812
require('zone.js/dist/async-test');
913
require('zone.js/dist/fake-async-test');
10-
require('zone.js/dist/sync-test');
11-
require('zone.js/dist/proxy-zone');
1214

1315
var appContext = require.context('../src', true, /\.spec\.ts/);
1416

0 commit comments

Comments
 (0)