Skip to content

Commit 7d2e803

Browse files
committed
test(@schematics/angular): add bazel tests
1 parent 6796d5c commit 7d2e803

File tree

1 file changed

+46
-5
lines changed
  • packages/schematics/angular

1 file changed

+46
-5
lines changed

packages/schematics/angular/BUILD

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,63 @@
66
licenses(["notice"]) # MIT
77

88
load("//tools:defaults.bzl", "ts_library")
9+
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
10+
11+
package(default_visibility = ["//visibility:public"])
912

1013
ts_library(
11-
name = "utility",
14+
name = "angular",
1215
srcs = glob(
13-
include = ["utility/**/*.ts"],
16+
include = ["**/*.ts"],
1417
exclude = [
15-
"utility/**/*_spec.ts",
16-
"utility/test/**",
18+
"**/*_spec.ts",
19+
"**/*_spec_large.ts",
20+
"**/*_benchmark.ts",
21+
# Also exclude templated files.
22+
"*/files/**/*.ts",
23+
"*/other-files/**/*.ts",
24+
# Exclude test helpers.
25+
"utility/test/**/*.ts"
1726
],
1827
),
19-
visibility = ["//visibility:public"],
2028
deps = [
2129
"//packages/angular_devkit/core",
2230
"//packages/angular_devkit/schematics",
2331
"//packages/angular_devkit/schematics:tasks",
32+
"@rxjs",
33+
"@rxjs//operators",
2434
# @typings: typescript
2535
# @typings: node
2636
],
2737
)
38+
39+
ts_library(
40+
name = "angular_test_lib",
41+
srcs = glob(
42+
include = [
43+
"**/*_spec.ts",
44+
"**/*_spec_large.ts",
45+
"utility/test/**/*.ts"
46+
],
47+
),
48+
deps = [
49+
":angular",
50+
"//packages/angular_devkit/core",
51+
"//packages/angular_devkit/schematics",
52+
"//packages/angular_devkit/schematics:testing",
53+
"@rxjs",
54+
"@rxjs//operators",
55+
# @typings: jasmine
56+
# @typings: node
57+
],
58+
)
59+
60+
# Disabled because 'collection.json' cannot be resolved in bazel, and all tests use it.
61+
# TODO(@filipesilva): figure out how to make data files resolve correctly.
62+
# jasmine_node_test(
63+
# name = "angular_test",
64+
# srcs = [":angular_test_lib"],
65+
# data = [
66+
# "collection.json"
67+
# ],
68+
# )

0 commit comments

Comments
 (0)