mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
test(upgrade): exclude unit test files from E2E application sources
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`.
(cherry picked from commit 7390af78b1)
This commit is contained in:
parent
38aca8fe79
commit
b6f3dfd796
1 changed files with 4 additions and 1 deletions
|
|
@ -6,7 +6,10 @@ create_upgrade_example_targets(
|
|||
name = "full",
|
||||
srcs = glob(
|
||||
["**/*.ts"],
|
||||
exclude = ["**/*_spec.ts"],
|
||||
exclude = [
|
||||
"**/*_spec.ts",
|
||||
"**/*.spec.ts",
|
||||
],
|
||||
),
|
||||
assets = ["styles.css"],
|
||||
e2e_srcs = glob(["e2e_test/*_spec.ts"]),
|
||||
|
|
|
|||
Loading…
Reference in a new issue