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

Commit 5193838

Browse files
JiaLiPassionmhevery
authored andcommitted
fix(bazel): add zone-testing bundle for bazel build (#982)
* fix(bazel): add zone-testing bundle for bazel build * fix(build): fix #404, add zone-testing to load test related files * fix(build): add zone-testing-node-bundle
1 parent 326a07f commit 5193838

File tree

4 files changed

+61
-4
lines changed

4 files changed

+61
-4
lines changed

Diff for: gulpfile.js

+22-4
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,30 @@ gulp.task('build/zone.js', ['compile-esm'], function(cb) {
104104
return generateScript('./lib/browser/rollup-main.ts', 'zone.js', false, cb);
105105
});
106106

107+
gulp.task('build/zone.min.js', ['compile-esm'], function(cb) {
108+
return generateScript('./lib/browser/rollup-main.ts', 'zone.min.js', true, cb);
109+
});
110+
111+
// Zone test bundle for the browser.
112+
gulp.task('build/zone-testing-bundle.js', ['compile-esm'], function(cb) {
113+
return generateScript('./lib/browser/rollup-test-main.ts', 'zone-testing-bundle.js', false, cb);
114+
});
115+
116+
// Zone test bundle for node.
117+
gulp.task('build/zone-testing-node-bundle.js', ['compile-esm'], function(cb) {
118+
return generateScript('./lib/node/rollup-test-main.ts', 'zone-testing-node-bundle.js', false, cb);
119+
});
120+
121+
// Zone test related files for the browser.
122+
gulp.task('build/zone-testing.js', ['compile-esm'], function(cb) {
123+
return generateScript('./lib/testing/zone-testing.ts', 'zone-testing.js', false, cb);
124+
});
125+
107126
// Zone for electron/nw environment.
108127
gulp.task('build/zone-mix.js', ['compile-esm-node'], function(cb) {
109128
return generateScript('./lib/mix/rollup-mix.ts', 'zone-mix.js', false, cb);
110129
});
111130

112-
gulp.task('build/zone.min.js', ['compile-esm'], function(cb) {
113-
return generateScript('./lib/browser/rollup-main.ts', 'zone.min.js', true, cb);
114-
});
115-
116131
gulp.task('build/zone-error.js', ['compile-esm'], function(cb) {
117132
return generateScript('./lib/common/error-rewrite.ts', 'zone-error.js', false, cb);
118133
});
@@ -246,6 +261,9 @@ gulp.task('build', [
246261
'build/zone.js',
247262
'build/zone.js.d.ts',
248263
'build/zone.min.js',
264+
'build/zone-testing.js',
265+
'build/zone-testing-bundle.js',
266+
'build/zone-testing-node-bundle.js',
249267
'build/zone-error.js',
250268
'build/zone-error.min.js',
251269
'build/zone-node.js',

Diff for: lib/browser/rollup-test-main.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import './rollup-main';
10+
11+
// load test related files into bundle
12+
import '../testing/zone-testing';

Diff for: lib/node/rollup-test-main.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import './rollup-main';
10+
11+
// load test related files into bundle
12+
import '../testing/zone-testing';

Diff for: lib/testing/zone-testing.ts

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
// load test related files into bundle in correct order
10+
import '../zone-spec/long-stack-trace';
11+
import '../zone-spec/proxy';
12+
import '../zone-spec/sync-test';
13+
import '../jasmine/jasmine';
14+
import '../zone-spec/async-test';
15+
import '../zone-spec/fake-async-test';

0 commit comments

Comments
 (0)