Repository navigation
Conversation
|
You can preview 1fa3687 at https://pr19558-1fa3687.ngbuilds.io/. |
|
You can preview 6328cff at https://pr19558-6328cff.ngbuilds.io/. |
|
You can preview 1c52a1d at https://pr19558-1c52a1d.ngbuilds.io/. |
|
You can preview 3575640 at https://pr19558-3575640.ngbuilds.io/. |
6831beb to
d7ca43c
Compare
|
You can preview d7ca43c at https://pr19558-d7ca43c.ngbuilds.io/. |
|
You can preview 3434b82 at https://pr19558-3434b82.ngbuilds.io/. |
|
You can preview 76483ed at https://pr19558-76483ed.ngbuilds.io/. |
|
You can preview 6ce1a62 at https://pr19558-6ce1a62.ngbuilds.io/. |
…a `Injector.get` Closes angular#15501
This allows use to fix `TestBed.overrideProvider` to keep imported `NgModule`s eager, while allowing our users to still keep the old semantics until they have fixed their tests.
|
@IgorMinar approves this change (talked offline). |
BREAKING CHANGE In PR angular#19558, we fixed a bug in `TestBed.overrideProvider` where eager providers were not being instantiated correctly. However, it turned out that since this bug had been around for quite a bit, many apps were relying on the broken behavior where the providers would not be instantiated. To assist in the transition, the `TestBed.deprecatedOverrideProvider` method was temporarily introduced to mimic the old behavior so that apps would have a longer time period to migrate their code. 2 years and 3 versions later, it is time to remove the temporary method. This commit removes `TestBed.deprecatedOverrideProvider` altogether. Any usages of `TestBed.deprecatedOverrideProvider` should be replaced with `TestBed.overrideProvider`. This may mean that providers that were not created before will now be instantiated, which could mean that your tests need to provide more mocks or stubs for the dependencies of the newly instantiated providers.
…#30576) BREAKING CHANGE In PR #19558, we fixed a bug in `TestBed.overrideProvider` where eager providers were not being instantiated correctly. However, it turned out that since this bug had been around for quite a bit, many apps were relying on the broken behavior where the providers would not be instantiated. To assist in the transition, the `TestBed.deprecatedOverrideProvider` method was temporarily introduced to mimic the old behavior so that apps would have a longer time period to migrate their code. 2 years and 3 versions later, it is time to remove the temporary method. This commit removes `TestBed.deprecatedOverrideProvider` altogether. Any usages of `TestBed.deprecatedOverrideProvider` should be replaced with `TestBed.overrideProvider`. This may mean that providers that were not created before will now be instantiated, which could mean that your tests need to provide more mocks or stubs for the dependencies of the newly instantiated providers. PR Close #30576
…#30576) BREAKING CHANGE In PR #19558, we fixed a bug in `TestBed.overrideProvider` where eager providers were not being instantiated correctly. However, it turned out that since this bug had been around for quite a bit, many apps were relying on the broken behavior where the providers would not be instantiated. To assist in the transition, the `TestBed.deprecatedOverrideProvider` method was temporarily introduced to mimic the old behavior so that apps would have a longer time period to migrate their code. 2 years and 3 versions later, it is time to remove the temporary method. This commit removes `TestBed.deprecatedOverrideProvider` altogether. Any usages of `TestBed.deprecatedOverrideProvider` should be replaced with `TestBed.overrideProvider`. This may mean that providers that were not created before will now be instantiated, which could mean that your tests need to provide more mocks or stubs for the dependencies of the newly instantiated providers. PR Close #30576
|
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. |
…a
Injector.getThis also fixes the problem that all
NgModuleinstancesbecame lazy when using
TestBed.overrideProvider.Closes #15501
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information