Skip to content

Conversation

clydin
Copy link
Member

@clydin clydin commented Sep 16, 2025

Debugging the unit-test builder can be challenging, particularly when using runners like Vitest that rely on virtual or in-memory files for test setup and execution. It is difficult to inspect the final build artifacts that are passed to the test runner.

This commit introduces a new hidden boolean option, dumpVirtualFiles, to the unit-test builder's schema. When this option is enabled, the builder will write the full build output to a directory within the project's cache (.angular/cache/<project-name>/unit-test/output-files/).

This provides a crucial debugging mechanism, allowing developers to inspect the exact contents of the files being used in the test execution, which helps in troubleshooting complex configuration and build-related problems.

@clydin clydin added the target: major This PR is targeted for the next major release label Sep 16, 2025
Debugging the `unit-test` builder can be challenging, particularly when using runners like Vitest that rely on virtual or in-memory files for test setup and execution. It is difficult to inspect the final build artifacts that are passed to the test runner.

This commit introduces a new hidden boolean option, `dumpVirtualFiles`, to the `unit-test` builder's schema. When this option is enabled, the builder will write the full build output to a directory within the project's cache (`.angular/cache/<project-name>/unit-test/output-files/`).

This provides a crucial debugging mechanism, allowing developers to inspect the exact contents of the files being used in the test execution, which helps in troubleshooting complex configuration and build-related problems.
@clydin clydin force-pushed the unit-test/debug-dump-files branch from 7d2b63e to 63813f5 Compare September 16, 2025 14:11
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 16, 2025
@clydin clydin requested a review from alan-agius4 September 16, 2025 15:53
@alan-agius4 alan-agius4 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 Sep 16, 2025
@clydin clydin merged commit 48e85ef into angular:main Sep 16, 2025
33 checks passed
@clydin clydin deleted the unit-test/debug-dump-files branch September 16, 2025 16:18
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 target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants