Skip to content

test(upgrade): exclude unit test files from E2E application sources#68791

Open
alan-agius4 wants to merge 1 commit into
angular:mainfrom
alan-agius4:spec-exclude
Open

test(upgrade): exclude unit test files from E2E application sources#68791
alan-agius4 wants to merge 1 commit into
angular:mainfrom
alan-agius4:spec-exclude

Conversation

@alan-agius4
Copy link
Copy Markdown
Contributor

Exclude **/*.spec.ts files from the srcs glob of the full_sources target.

Previously, module.spec.ts was compiled as part of the application's main sources because the glob pattern only excluded **/*_spec.ts (E2E specs). Consequently, module.spec.js was generated and included in the runfiles of the E2E test target, causing the Protractor runner to load and execute it. This failed since the E2E testing runner does not have access to unit testing imports like @angular/core/testing.

Exclude `**/*.spec.ts` files from the `srcs` glob of the `full_sources` target.

Previously, `module.spec.ts` was compiled as part of the application's main sources because the glob pattern only excluded `**/*_spec.ts` (E2E specs). Consequently, `module.spec.js` was generated and included in the runfiles of the E2E test target, causing the Protractor runner to load and execute it. This failed since the E2E testing runner does not have access to unit testing imports like `@angular/core/testing`.
@pullapprove pullapprove Bot requested a review from JeanMeche May 19, 2026 08:17
@angular-robot angular-robot Bot added the area: upgrade Issues related to AngularJS → Angular upgrade APIs label May 19, 2026
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release and removed area: upgrade Issues related to AngularJS → Angular upgrade APIs labels May 19, 2026
@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 May 19, 2026
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 target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants