Skip to content

Commit 3b5afbb

Browse files
committed
test(@angular/build): separate application and dev-server integration 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.
1 parent 1c011a2 commit 3b5afbb

File tree

1 file changed

+42
-4
lines changed

1 file changed

+42
-4
lines changed

packages/angular/build/BUILD.bazel

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,39 @@ jasmine_node_test(
130130
)
131131

132132
ts_project(
133-
name = "integration_test_lib",
133+
name = "application_integration_test_lib",
134134
testonly = True,
135-
srcs = glob(include = ["src/builders/**/tests/**/*.ts"]),
135+
srcs = glob(include = ["src/builders/application/tests/**/*.ts"]),
136+
deps = [
137+
":build_rjs",
138+
"//packages/angular/build/private:private_rjs",
139+
"//modules/testing/builder:builder_rjs",
140+
"//packages/angular_devkit/architect:architect_rjs",
141+
"//packages/angular_devkit/architect/node:node_rjs",
142+
"//packages/angular_devkit/architect/testing:testing_rjs",
143+
"//packages/angular_devkit/core:core_rjs",
144+
"//packages/angular_devkit/core/node:node_rjs",
145+
146+
# Base dependencies for the application in hello-world-app.
147+
"//:root_modules/@angular/common",
148+
"//:root_modules/@angular/compiler",
149+
"//:root_modules/@angular/compiler-cli",
150+
"//:root_modules/@angular/core",
151+
"//:root_modules/@angular/platform-browser",
152+
"//:root_modules/@angular/platform-browser-dynamic",
153+
"//:root_modules/@angular/router",
154+
"//:root_modules/rxjs",
155+
"//:root_modules/tslib",
156+
"//:root_modules/typescript",
157+
"//:root_modules/zone.js",
158+
"//:root_modules/buffer",
159+
],
160+
)
161+
162+
ts_project(
163+
name = "dev-server_integration_test_lib",
164+
testonly = True,
165+
srcs = glob(include = ["src/builders/dev-server/tests/**/*.ts"]),
136166
deps = [
137167
":build_rjs",
138168
"//packages/angular/build/private:private_rjs",
@@ -165,11 +195,19 @@ ts_project(
165195
)
166196

167197
jasmine_node_test(
168-
name = "integration_tests",
198+
name = "application_integration_tests",
199+
size = "large",
200+
flaky = True,
201+
shard_count = 10,
202+
deps = [":application_integration_test_lib"],
203+
)
204+
205+
jasmine_node_test(
206+
name = "dev-server_integration_tests",
169207
size = "large",
170208
flaky = True,
171209
shard_count = 10,
172-
deps = [":integration_test_lib"],
210+
deps = [":dev-server_integration_test_lib"],
173211
)
174212

175213
genrule(

0 commit comments

Comments
 (0)