Skip to content

refactor(@angular/build): modularize unit-test builder with runner-specific logic #30910

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

Merged
merged 1 commit into from
Aug 14, 2025

Conversation

clydin
Copy link
Member

@clydin clydin commented Aug 13, 2025

The main unit-test builder is refactored to act as a dispatcher, delegating the core execution to runner-specific implementations. This change significantly improves the structure and maintainability of the testing infrastructure.

Key changes:

  • A new runners directory is created within the unit-test builder to house runner-specific logic.
  • All Vitest-related logic is extracted from the main builder and moved into runners/vitest/.
  • The Karma bridge is moved into runners/karma/.
  • A new test-discovery.ts file is introduced to centralize test finding logic, with a TODO to move the implementation there in the future.

…ecific logic

The main `unit-test` builder is refactored to act as a dispatcher, delegating the core execution to runner-specific implementations. This change significantly improves the structure and maintainability of the testing infrastructure.

Key changes:
- A new `runners` directory is created within the `unit-test` builder to house runner-specific logic.
- All Vitest-related logic is extracted from the main builder and moved into `runners/vitest/`.
- The Karma bridge is moved into `runners/karma/`.
- A new `test-discovery.ts` file is introduced to centralize test finding logic, with a TODO to move the implementation there in the future.
@clydin clydin added target: major This PR is targeted for the next major release target: minor This PR is targeted for the next minor release and removed target: major This PR is targeted for the next major release labels Aug 13, 2025
@clydin clydin marked this pull request as ready for review August 13, 2025 21:35
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Aug 14, 2025
@alan-agius4 alan-agius4 merged commit f6a6efd into angular:main Aug 14, 2025
34 checks passed
@clydin clydin deleted the unit-test/reorg-runners branch August 14, 2025 11:43
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: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants