Repository navigation
fix(testing): add an explicit doAsyncPrecompilation step - #10015
Merged
Merged
Conversation
Contributor
Author
There was a problem hiding this comment.
Cleanup: remove this comment.
Contributor
There was a problem hiding this comment.
"{ return" is not needed
Contributor
Author
There was a problem hiding this comment.
tsc complains without it, I think because of the object syntax.
juliemr
force-pushed
the
7-12-testbed
branch
4 times, most recently
from
July 13, 2016 20:11
9a1265a to
5e07b9c
Compare
Contributor
Author
|
Done, and Travis is happy again. Please take a look! |
Contributor
There was a problem hiding this comment.
do you also want to rename the file to test_bed.ts?
Contributor
|
otherwise lgtm |
This removes the magic from the `inject` test helper that would inspect the current zone and would only work with our `async` test helper. Now, `inject` is always synchronous, and if you are using a module that requires async precompilation, you're required to call `doAsyncPrecompilation` in your tests. This is part of the breaking changes introduced with the swap to each test having an AppModule. Closes angular#9975 Closes angular#9593 BREAKING CHANGE: `TestInjector` is now renamed to `TestBed` Before: ```js import {TestInjector, getTestInjector} from '@angular/core/testing'; ``` After: ```js import {TestBed, getTestBed} from '@angular/core/testing'; ```
Contributor
Author
|
Thanks! Waiting on Travis and then I'll merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the magic from the
injecttest helper that would inspectthe current zone and would only work with our
asynctest helper.Now,
injectis always synchronous, and if you are using a modulethat requires async precompilation, you're required to call
doAsyncPrecompilationin your tests.This is part of the breaking changes introduced with the swap
to each test having an AppModule.
Also, cleans up some APIs and renames
TestInjectortoTestBed.Closes #9975
Closes #9593