Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upfix(ivy): Handle overrides for {providedIn: AModule} in R3TestBed #33606
+40
−8
Conversation
LGTM |
This issue was found when debugging a test failure that was using lazy loaded modules with the router. When doing this, the router calls `NgModuleFactory.create` for the loaded module. This module gets a new injector so the overrides provided in TestBed are not applied unless the Injectable is in the providers list (which is not the case for {providedIn...} Injectables).
This comment has been minimized.
This comment has been minimized.
Ivy presubmit |
This comment has been minimized.
This comment has been minimized.
only regressions are e2e flakes that wouldn't be using TestBed |
atscott
added a commit
that referenced
this pull request
Nov 7, 2019
…3606) This issue was found when debugging a test failure that was using lazy loaded modules with the router. When doing this, the router calls `NgModuleFactory.create` for the loaded module. This module gets a new injector so the overrides provided in TestBed are not applied unless the Injectable is in the providers list (which is not the case for {providedIn...} Injectables). PR Close #33606
mohaxspb
added a commit
to mohaxspb/angular
that referenced
this pull request
Nov 7, 2019
…gular#33606) This issue was found when debugging a test failure that was using lazy loaded modules with the router. When doing this, the router calls `NgModuleFactory.create` for the loaded module. This module gets a new injector so the overrides provided in TestBed are not applied unless the Injectable is in the providers list (which is not the case for {providedIn...} Injectables). PR Close angular#33606
mohaxspb
added a commit
to mohaxspb/angular
that referenced
this pull request
Nov 7, 2019
…gular#33606) This issue was found when debugging a test failure that was using lazy loaded modules with the router. When doing this, the router calls `NgModuleFactory.create` for the loaded module. This module gets a new injector so the overrides provided in TestBed are not applied unless the Injectable is in the providers list (which is not the case for {providedIn...} Injectables). PR Close angular#33606
This comment has been minimized.
This comment has been minimized.
angular-automatic-lock-bot
bot
commented
Dec 8, 2019
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.
atscott commentedNov 5, 2019
This issue was found when debugging a test failure that was using lazy
loaded modules with the router. When doing this, the router calls
NgModuleFactory.create
for the loaded module. This module gets a newinjector so the overrides provided in TestBed are not applied unless the
Injectable is in the providers list (which is not the case for
{providedIn...} Injectables).