Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented Jan 7, 2026

When running unit tests in debug mode, it is beneficial to keep the component's DOM state intact after the test completes for inspection. This change disables the automatic TestBed teardown (destroyAfterEach) when the 'debug' option is enabled.

Closes #31733

…test

When running unit tests in debug mode, it is beneficial to keep the component's DOM state intact after the test completes for inspection. This change disables the automatic TestBed teardown (destroyAfterEach) when the 'debug' option is enabled.
@clydin clydin added the target: minor This PR is targeted for the next minor release label Jan 7, 2026
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: @angular/build labels Jan 7, 2026
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jan 7, 2026
@clydin clydin requested a review from alan-agius4 January 7, 2026 15:59
@hybrist hybrist added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 7, 2026
@clydin clydin removed the request for review from alan-agius4 January 7, 2026 17:21
@clydin clydin merged commit 87175f9 into angular:main Jan 7, 2026
39 checks passed
@clydin
Copy link
Member Author

clydin commented Jan 7, 2026

This PR was merged into the repository. The changes were merged into the following branches:

@clydin clydin deleted the vitest/debug-teardown branch January 7, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unit-test builder should allow users to disable teardown for debugging reasons

2 participants