Skip to content

Conversation

@crisbeto
Copy link
Member

Angular 12.1.2 includes opt-in automatic test module teardown which is similar to our logic of destroying the current fixture. These changes clean up our monkey patches and use the new option instead.

@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 15, 2021
@crisbeto crisbeto requested review from devversion and jelbourn July 15, 2021 15:05
@crisbeto crisbeto added merge safe P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Jul 15, 2021
@crisbeto crisbeto marked this pull request as ready for review July 15, 2021 15:05
@crisbeto crisbeto requested review from a team and andrewseguin as code owners July 15, 2021 15:05
beforeAll(() => {
TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: {destroyAfterEach: true}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also enable rethrowErrors everywhere as well?

Suggested change
teardown: {destroyAfterEach: true}
teardown: {destroyAfterEach: true, rethrowErrors: true}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I assume a lint rule enforcing the option is not reasonable because eventually this will be the default anyway.

@crisbeto
Copy link
Member Author

Yeah, the idea is to potentially flip the default in v13.

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jul 15, 2021
Angular 12.1.2 includes [opt-in automatic test module teardown](angular/angular#42566) which is similar to our logic of destroying the current fixture. These changes clean up our monkey patches and use the new option instead.
@crisbeto crisbeto force-pushed the automatic-test-teardown-again branch from bf0c248 to 4df538c Compare July 16, 2021 07:18
@amysorto amysorto merged commit d090617 into angular:master Jul 16, 2021
amysorto pushed a commit that referenced this pull request Jul 16, 2021
Angular 12.1.2 includes [opt-in automatic test module teardown](angular/angular#42566) which is similar to our logic of destroying the current fixture. These changes clean up our monkey patches and use the new option instead.

(cherry picked from commit d090617)
@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 Aug 16, 2021
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 cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants