Skip to content

Commit f08ec44

Browse files
filipesilvahansl
authored andcommitted
build: re-enable missing bazel tests
1 parent 1c8e506 commit f08ec44

File tree

5 files changed

+63
-59
lines changed
  • packages
  • tests/angular_devkit/schematics/tools/file-system-engine-host

5 files changed

+63
-59
lines changed

packages/angular_devkit/core/BUILD

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,7 @@ ts_library(
4343
"src/**/*_spec.ts",
4444
"src/**/*_spec_large.ts",
4545
],
46-
exclude = [
47-
# The workspace spec expects workspace.json to be there, but it's not.
48-
# TODO(@filipesilva): figure out how to resolve these in bazel.
49-
"src/workspace/workspace_spec.ts",
50-
],
5146
),
52-
data = [
53-
"src/workspace/workspace-schema.json"
54-
],
5547
deps = [
5648
":core",
5749
":node",
@@ -60,6 +52,10 @@ ts_library(
6052
# @typings: jasmine
6153
# @typings: node
6254
],
55+
data = [
56+
"src/workspace/workspace-schema.json",
57+
"src/workspace/test/test-workspace.json"
58+
],
6359
)
6460

6561
jasmine_node_test(
@@ -98,11 +94,6 @@ ts_library(
9894
"node/**/*_spec.ts",
9995
"node/**/*_spec_large.ts",
10096
],
101-
exclude = [
102-
# The node resolve spec uses the _devKitRoot global, which isn't available in Bazel.
103-
# TODO(@filipesilva): figure out an alternative to that global.
104-
"node/resolve_spec.ts",
105-
],
10697
),
10798
deps = [
10899
":core",

packages/angular_devkit/schematics/BUILD

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ ts_library(
3939
"src/**/*_spec.ts",
4040
"src/**/*_spec_large.ts",
4141
],
42-
exclude = [
43-
# Instances of extended errors are showing Error as the constructor instead.
44-
# TODO(@filipesilva): figure out why that is.
45-
"src/rules/call_spec.ts",
46-
],
4742
),
4843
deps = [
4944
":schematics",
@@ -97,14 +92,10 @@ ts_library(
9792
"tasks/**/*_spec_large.ts",
9893
"tasks/tslint-fix/test/**/*.ts",
9994
],
100-
exclude = [
101-
# Disabled because 'collection.json' cannot be resolved in bazel.
102-
# TODO(@filipesilva): figure out how to make data files resolve correctly.
103-
"tasks/tslint-fix/executor_spec.ts",
104-
],
10595
),
10696
data = [
10797
"tasks/tslint-fix/test/collection.json",
98+
"tasks/tslint-fix/test/rules/customRuleRule.js",
10899
],
109100
deps = [
110101
":tasks",
@@ -121,11 +112,10 @@ ts_library(
121112
)
122113

123114

124-
# Disabled since we are excluding the only test in tasks.
125-
# jasmine_node_test(
126-
# name = "tasks_test",
127-
# srcs = [":tasks_test_lib"],
128-
# )
115+
jasmine_node_test(
116+
name = "tasks_test",
117+
srcs = [":tasks_test_lib"],
118+
)
129119

130120

131121
# @angular-devkit/schematics/tools
@@ -137,6 +127,7 @@ ts_library(
137127
exclude = [
138128
"tools/**/*_spec.ts",
139129
"tools/**/*_benchmark.ts",
130+
"tools/test/**/*.ts",
140131
],
141132
),
142133
module_name = "@angular-devkit/schematics/tools",
@@ -158,15 +149,8 @@ ts_library(
158149
include = [
159150
"tools/**/*_spec.ts",
160151
"tools/**/*_spec_large.ts",
152+
"tools/test/**/*.ts",
161153
],
162-
exclude = [
163-
# The node resolve spec uses the _devKitRoot global, which isn't available in Bazel.
164-
# TODO(@filipesilva): figure out an alternative to that global.
165-
"tools/file-system-engine-host_spec.ts",
166-
],
167-
),
168-
data = glob(
169-
include = ["tools/test/file-system-engine-host/**/collection.json"],
170154
),
171155
deps = [
172156
":tools",
@@ -175,6 +159,7 @@ ts_library(
175159
":testing",
176160
"//packages/angular_devkit/core",
177161
"//packages/angular_devkit/core:node",
162+
"//tests/angular_devkit/schematics/tools/file-system-engine-host:file_system_engine_host_test_lib",
178163
"@rxjs",
179164
"@rxjs//operators",
180165
# @typings: jasmine
@@ -194,7 +179,6 @@ ts_library(
194179
name = "testing",
195180
srcs = glob(
196181
include = ["testing/**/*.ts"],
197-
exclude = [],
198182
),
199183
module_name = "@angular-devkit/schematics/testing",
200184
module_root = "testing/index.d.ts",

packages/schematics/angular/BUILD

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ ts_library(
4545
"utility/test/**/*.ts"
4646
],
4747
),
48+
data = glob(
49+
include = [
50+
"**/*.json",
51+
"*/files/**",
52+
"*/other-files/**",
53+
]
54+
),
4855
deps = [
4956
":angular",
5057
"//packages/angular_devkit/core",
@@ -57,12 +64,7 @@ ts_library(
5764
],
5865
)
5966

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-
# )
67+
jasmine_node_test(
68+
name = "angular_test",
69+
srcs = [":angular_test_lib"],
70+
)

packages/schematics/update/BUILD

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ ts_library(
3737
"**/*_spec.ts",
3838
"**/*_spec_large.ts",
3939
],
40-
exclude = [
41-
# The purify spec also depends on the webpack typings so we ignore it.
42-
# "src/purify/**",
43-
],
40+
),
41+
data = glob(
42+
include = [
43+
"**/*.json",
44+
]
4445
),
4546
deps = [
4647
":update",
@@ -54,12 +55,7 @@ ts_library(
5455
],
5556
)
5657

57-
# Disabled because 'collection.json' cannot be resolved in bazel, and all tests use it.
58-
# TODO(@filipesilva): figure out how to make data files resolve correctly.
59-
# jasmine_node_test(
60-
# name = "update_test",
61-
# srcs = [":update_test_lib"],
62-
# data = [
63-
# "collection.json"
64-
# ],
65-
# )
58+
jasmine_node_test(
59+
name = "update_test",
60+
srcs = [":update_test_lib"],
61+
)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright Google Inc. All Rights Reserved.
2+
#
3+
# Use of this source code is governed by an MIT-style license that can be
4+
# found in the LICENSE file at https://angular.io/license
5+
package(default_visibility = ["//visibility:public"])
6+
7+
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
8+
9+
licenses(["notice"]) # MIT License
10+
11+
ts_library(
12+
name = "file_system_engine_host_test_lib",
13+
srcs = glob(
14+
include = [
15+
"**/*.ts",
16+
],
17+
),
18+
data = glob(
19+
include = ["**/collection.json"],
20+
),
21+
deps = [
22+
"//packages/angular_devkit/schematics:schematics",
23+
# ":testing",
24+
# "//packages/angular_devkit/core",
25+
# "//packages/angular_devkit/core:node",
26+
# "@rxjs",
27+
# "@rxjs//operators",
28+
# @typings: jasmine
29+
# @typings: node
30+
],
31+
)

0 commit comments

Comments
 (0)