Skip to content

feat(@angular/build): disable TestBed teardown during debugging in Vitest#32235

Merged
clydin merged 1 commit intoangular:mainfrom
clydin:vitest/debug-teardown
Jan 7, 2026
Merged

feat(@angular/build): disable TestBed teardown during debugging in Vitest#32235
clydin merged 1 commit intoangular:mainfrom
clydin:vitest/debug-teardown

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
@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 Feb 7, 2026
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: @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