Please sign in to comment.
fix(ivy): provider override via TestBed should remove old providers f…
…rom the list (#33706) While overriding providers in Ivy TestBed (via TestBed.overrideProvider call), the old providers were retained in the list, since the override takes precedence. However, presence of providers in the list might have side-effect: if a provider has the `ngOnDestroy` lifecycle hook, this hook will be registered and invoked later (when component is destroyed). This commit updates TestBed logic to clear provider list by removing the ones which have overrides. PR Close #33706
- Loading branch information
Showing with 51 additions and 15 deletions.