-
Notifications
You must be signed in to change notification settings - Fork 408
fix(bazel): add zone-testing bundle for bazel build #982
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google Inc. All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| import './rollup-main'; | ||
|
|
||
| // load test related files into bundle | ||
| import '../testing/zone-testing'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google Inc. All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| import './rollup-main'; | ||
|
|
||
| // load test related files into bundle | ||
| import '../testing/zone-testing'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google Inc. All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| // load test related files into bundle in correct order | ||
| import '../zone-spec/long-stack-trace'; | ||
| import '../zone-spec/proxy'; | ||
| import '../zone-spec/sync-test'; | ||
| import '../jasmine/jasmine'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this makes an assumption about zone and jasmine being installed as siblings. Why not just
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I am not sure I understand your suggestion, I just import
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, I see, I thought this was importing jasmine library itself, but it's https://github.com/angular/zone.js/blob/master/lib/jasmine/jasmine.ts The user does need to ensure that jasmine itself is loaded before the zone-testing bundle
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, if |
||
| import '../zone-spec/async-test'; | ||
| import '../zone-spec/fake-async-test'; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the scripts needed are different depending if you are testing in node or in a browser.
For node, you need to start with zone-node.js, like Misko did in this PR:
https://github.com/angular/angular/pull/21053/files#diff-8ac936419da1e3d027833281525dba0e
Maybe we should also publish
zone-node-testing.js?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, I will make
zone-node-testing-bundle