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(core): TestBed should not override NgZone from initTestEnvironment #55226

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Apr 5, 2024

Prior to this change, NgZone was provided by default in TestBed in a location that would override anything configured in TestBed.initTestEnvironment. This change moves the default NgZone provider to the RootScopeModule and these providers can be overridden by the ones in additionalModuleTypes, which are assigned from the first argument of initTestEnvironment. This makes it possible to configure Zone globally for all tests as opposed to needing to repeat it in configureTestingModule of each suite.

Prior to this change, `NgZone` was provided by default in TestBed in a
location that would override anything configured in
`TestBed.initTestEnvironment`. This change moves the default `NgZone`
provider to the `RootScopeModule` and these providers can be overridden
by the ones in `additionalModuleTypes`, which are assigned from the
first argument of `initTestEnvironment`. This makes it possible to
configure Zone globally for all tests as opposed to needing to repeat it
in `configureTestingModule` of each suite.
@atscott atscott added the target: minor This PR is targeted for the next minor release label Apr 5, 2024
@thePunderWoman thePunderWoman added the area: testing Issues related to Angular testing features, such as TestBed label Apr 5, 2024
@ngbot ngbot bot added this to the Backlog milestone Apr 5, 2024
@thePunderWoman thePunderWoman added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 5, 2024
@AndrewKushnir AndrewKushnir removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 5, 2024
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Apr 5, 2024
@atscott atscott closed this in e9a0c86 Apr 8, 2024
@atscott
Copy link
Contributor Author

atscott commented Apr 8, 2024

This PR was merged into the repository by commit e9a0c86.

atscott added a commit to atscott/angular that referenced this pull request Apr 10, 2024
…vironment (angular#55226)"

This reverts commit e9a0c86.
flakes and broken tests. needs more investigation.
atscott added a commit that referenced this pull request Apr 10, 2024
…vironment (#55226)" (#55286)

This reverts commit e9a0c86.
flakes and broken tests. needs more investigation.

PR Close #55286
@atscott atscott reopened this Apr 10, 2024
@atscott atscott added requires: TGP This PR requires a passing TGP before merging is allowed and removed action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Apr 10, 2024
@pullapprove pullapprove bot added target: minor This PR is targeted for the next minor release and removed requires: TGP This PR requires a passing TGP before merging is allowed labels Apr 10, 2024
iteriani pushed a commit to iteriani/angular that referenced this pull request Apr 11, 2024
angular#55226)

Prior to this change, `NgZone` was provided by default in TestBed in a
location that would override anything configured in
`TestBed.initTestEnvironment`. This change moves the default `NgZone`
provider to the `RootScopeModule` and these providers can be overridden
by the ones in `additionalModuleTypes`, which are assigned from the
first argument of `initTestEnvironment`. This makes it possible to
configure Zone globally for all tests as opposed to needing to repeat it
in `configureTestingModule` of each suite.

PR Close angular#55226
iteriani pushed a commit to iteriani/angular that referenced this pull request Apr 11, 2024
…vironment (angular#55226)" (angular#55286)

This reverts commit e9a0c86.
flakes and broken tests. needs more investigation.

PR Close angular#55286
@atscott atscott added state: blocked requires: TGP This PR requires a passing TGP before merging is allowed labels Apr 12, 2024
@pullapprove pullapprove bot removed the requires: TGP This PR requires a passing TGP before merging is allowed label Apr 12, 2024
@atscott atscott added the requires: TGP This PR requires a passing TGP before merging is allowed label May 1, 2024
@pullapprove pullapprove bot removed the requires: TGP This PR requires a passing TGP before merging is allowed label May 1, 2024
@atscott
Copy link
Contributor Author

atscott commented May 2, 2024

TESTED=TGP

@atscott atscott added action: merge The PR is ready for merge by the caretaker and removed state: blocked labels May 2, 2024
@ngbot
Copy link

ngbot bot commented May 2, 2024

I see that you just added the action: merge label, but the following checks are still failing:
    failure status "google-internal-tests" is failing
    pending status "mergeability" is pending

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken main, please try rebasing to main and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@atscott atscott added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label May 2, 2024
@atscott
Copy link
Contributor Author

atscott commented May 2, 2024

merge assistance: green TGP.

@atscott atscott added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: rc This PR is targeted for the next release-candidate and removed action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: minor This PR is targeted for the next minor release labels May 2, 2024
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit 7330b69.

AndrewKushnir pushed a commit that referenced this pull request May 6, 2024
#55226)

Prior to this change, `NgZone` was provided by default in TestBed in a
location that would override anything configured in
`TestBed.initTestEnvironment`. This change moves the default `NgZone`
provider to the `RootScopeModule` and these providers can be overridden
by the ones in `additionalModuleTypes`, which are assigned from the
first argument of `initTestEnvironment`. This makes it possible to
configure Zone globally for all tests as opposed to needing to repeat it
in `configureTestingModule` of each suite.

PR Close #55226
@angular-automatic-lock-bot
Copy link

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 Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: testing Issues related to Angular testing features, such as TestBed merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants