Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ivy): align TestBed.overrideProvider with what happens with provi… #33769

Closed
wants to merge 1 commit into from

Conversation

@atscott
Copy link
Contributor

atscott commented Nov 12, 2019

…ders in TestBed providers array

In Ivy, if you do:
TestBed.configureTestingModule({providers: [{provide: Service}]});
the injector will attempt to inject Service as if it was simply listed
in the providers array like {providers: [Service]}
This fixes an inconsistency when similarly providing an override with no
useValue or useFactory.

Copy link
Contributor

AndrewKushnir left a comment

LGTM 👍

@atscott atscott force-pushed the atscott:useclass branch from 284b7e7 to 6b00e2d Nov 12, 2019
@atscott

This comment has been minimized.

Copy link
Contributor Author

atscott commented Nov 12, 2019

…ders in TestBed providers array

In Ivy, if you do:
`TestBed.configureTestingModule({providers: [{provide: Service}]});`
the injector will attempt to inject Service as if it was simply listed
in the providers array like `{providers: [Service]}`
This fixes an inconsistency when similarly providing an override with no
`useValue` or `useFactory`.
@atscott atscott force-pushed the atscott:useclass branch from 6b00e2d to f7c15c4 Dec 6, 2019
@atscott

This comment has been minimized.

Copy link
Contributor Author

atscott commented Dec 6, 2019

Global presubmit no regressions

AndrewKushnir added a commit that referenced this pull request Dec 6, 2019
…ders in TestBed providers array (#33769)

In Ivy, if you do:
`TestBed.configureTestingModule({providers: [{provide: Service}]});`
the injector will attempt to inject Service as if it was simply listed
in the providers array like `{providers: [Service]}`
This fixes an inconsistency when similarly providing an override with no
`useValue` or `useFactory`.

PR Close #33769
josephperrott added a commit to josephperrott/angular that referenced this pull request Dec 11, 2019
…ders in TestBed providers array (angular#33769)

In Ivy, if you do:
`TestBed.configureTestingModule({providers: [{provide: Service}]});`
the injector will attempt to inject Service as if it was simply listed
in the providers array like `{providers: [Service]}`
This fixes an inconsistency when similarly providing an override with no
`useValue` or `useFactory`.

PR Close angular#33769
@angular-automatic-lock-bot

This comment has been minimized.

Copy link

angular-automatic-lock-bot bot commented Jan 6, 2020

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.