Skip to content

Commit

Permalink
test(@angular/build): separate application and dev-server integration…
Browse files Browse the repository at this point in the history
… test targets

The integration tests for the application and dev-server targets within
`@angular/build` have been separated into two bazel targets. This allows
more fine-grained control of test options for each builder as well as reducing
the overall size of each target.
  • Loading branch information
clydin committed Jan 7, 2025
1 parent 1c011a2 commit 3b5afbb
Showing 1 changed file with 42 additions and 4 deletions.
46 changes: 42 additions & 4 deletions packages/angular/build/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,39 @@ jasmine_node_test(
)

ts_project(
name = "integration_test_lib",
name = "application_integration_test_lib",
testonly = True,
srcs = glob(include = ["src/builders/**/tests/**/*.ts"]),
srcs = glob(include = ["src/builders/application/tests/**/*.ts"]),
deps = [
":build_rjs",
"//packages/angular/build/private:private_rjs",
"//modules/testing/builder:builder_rjs",
"//packages/angular_devkit/architect:architect_rjs",
"//packages/angular_devkit/architect/node:node_rjs",
"//packages/angular_devkit/architect/testing:testing_rjs",
"//packages/angular_devkit/core:core_rjs",
"//packages/angular_devkit/core/node:node_rjs",

# Base dependencies for the application in hello-world-app.
"//:root_modules/@angular/common",
"//:root_modules/@angular/compiler",
"//:root_modules/@angular/compiler-cli",
"//:root_modules/@angular/core",
"//:root_modules/@angular/platform-browser",
"//:root_modules/@angular/platform-browser-dynamic",
"//:root_modules/@angular/router",
"//:root_modules/rxjs",
"//:root_modules/tslib",
"//:root_modules/typescript",
"//:root_modules/zone.js",
"//:root_modules/buffer",
],
)

ts_project(
name = "dev-server_integration_test_lib",
testonly = True,
srcs = glob(include = ["src/builders/dev-server/tests/**/*.ts"]),
deps = [
":build_rjs",
"//packages/angular/build/private:private_rjs",
Expand Down Expand Up @@ -165,11 +195,19 @@ ts_project(
)

jasmine_node_test(
name = "integration_tests",
name = "application_integration_tests",
size = "large",
flaky = True,
shard_count = 10,
deps = [":application_integration_test_lib"],
)

jasmine_node_test(
name = "dev-server_integration_tests",
size = "large",
flaky = True,
shard_count = 10,
deps = [":integration_test_lib"],
deps = [":dev-server_integration_test_lib"],
)

genrule(
Expand Down

0 comments on commit 3b5afbb

Please sign in to comment.