-
Notifications
You must be signed in to change notification settings - Fork 27k
feat(core): Add TestBed.runInContext to help test functions which use inject
#47955
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
Conversation
cd3cc27 to
a13ec33
Compare
AndrewKushnir
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
AndrewKushnir
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
5760999 to
49324e4
Compare
…s which use `inject` This commit adds `TestBed.runInInjectionContext` which is equivalent to `TestBed.inject(EnvironmentInjector).runInContext`. This function will help make tests for functions which call `inject` from `@angular/core` a little bit less verbose.
49324e4 to
3f45e2d
Compare
AndrewKushnir
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
dylhunn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: public-api
|
@atscott Looks like this has a presubmit issue |
|
Caretaker Note: Please ignore the |
|
This PR was merged into the repository by commit 6acae14. |
|
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. |
…s which use `inject` (angular#47955) This commit adds `TestBed.runInInjectionContext` which is equivalent to `TestBed.inject(EnvironmentInjector).runInContext`. This function will help make tests for functions which call `inject` from `@angular/core` a little bit less verbose. PR Close angular#47955
This commit adds
TestBed.runInContextwhich is equivalent toTestBed.inject(EnvironmentInjector).runInContext. This function will help make tests for functions which callinjectfrom@angular/corea little bit less verbose.