Skip to content

Commit c40d726

Browse files
committed
build: migrate E2E tests to ts_project
The E2E tests have been migrated to the `rules_js` ts_project rule.
1 parent 9b883fe commit c40d726

File tree

6 files changed

+44
-40
lines changed

6 files changed

+44
-40
lines changed

tests/legacy-cli/BUILD.bazel

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
load("//tools:defaults.bzl", "ts_library")
1+
load("//tools:interop.bzl", "ts_project")
22
load(":e2e.bzl", "e2e_suites")
33

4-
ts_library(
4+
ts_project(
55
name = "runner",
66
testonly = True,
77
srcs = [
@@ -12,11 +12,11 @@ ts_library(
1212
"verdaccio_auth.yaml",
1313
],
1414
deps = [
15-
"//packages/angular_devkit/core",
16-
"//packages/angular_devkit/core/node",
17-
"//tests/legacy-cli/e2e/utils",
18-
"@npm//ansi-colors",
19-
"@npm//fast-glob",
15+
"//:root_modules/ansi-colors",
16+
"//:root_modules/fast-glob",
17+
"//packages/angular_devkit/core:core_rjs",
18+
"//packages/angular_devkit/core/node:node_rjs",
19+
"//tests/legacy-cli/e2e/utils:utils_rjs",
2020
],
2121
)
2222

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
load("//tools:defaults.bzl", "ts_library")
1+
load("//tools:interop.bzl", "ts_project")
22

3-
ts_library(
3+
package(default_visibility = ["//visibility:public"])
4+
5+
ts_project(
46
name = "initialize",
57
testonly = True,
68
srcs = glob(["**/*.ts"]),
79
data = [
810
"//:config-files",
911
],
10-
visibility = ["//visibility:public"],
1112
deps = [
12-
"//tests/legacy-cli/e2e/utils",
13+
"//tests/legacy-cli/e2e/utils:utils_rjs",
1314
],
1415
)
+5-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
load("//tools:defaults.bzl", "ts_library")
1+
load("//tools:interop.bzl", "ts_project")
22

3-
ts_library(
3+
package(default_visibility = ["//visibility:public"])
4+
5+
ts_project(
46
name = "setup",
57
testonly = True,
68
srcs = glob(["**/*.ts"]),
7-
visibility = ["//visibility:public"],
89
deps = [
9-
"//tests/legacy-cli/e2e/utils",
10+
"//tests/legacy-cli/e2e/utils:utils_rjs",
1011
],
1112
)
+10-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
load("//tools:defaults.bzl", "ts_library")
1+
load("//tools:interop.bzl", "ts_project")
22

3-
ts_library(
3+
package(default_visibility = ["//visibility:public"])
4+
5+
ts_project(
46
name = "tests",
57
testonly = True,
68
srcs = glob(["**/*.ts"]),
79
data = [
810
"//tests/legacy-cli/e2e/ng-snapshot",
911
],
10-
visibility = ["//visibility:public"],
1112
deps = [
12-
"//tests/legacy-cli/e2e/utils",
13-
"@npm//@types/express",
14-
"@npm//@types/semver",
15-
"@npm//express",
16-
"@npm//fast-glob",
17-
"@npm//semver",
13+
"//:root_modules/@types/express",
14+
"//:root_modules/@types/semver",
15+
"//:root_modules/express",
16+
"//:root_modules/fast-glob",
17+
"//:root_modules/semver",
18+
"//tests/legacy-cli/e2e/utils:utils_rjs",
1819
],
1920
)
+16-14
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
load("//tools:defaults.bzl", "ts_library")
1+
load("//tools:interop.bzl", "ts_project")
22

3-
ts_library(
3+
package(default_visibility = ["//visibility:public"])
4+
5+
ts_project(
46
name = "utils",
57
testonly = True,
68
srcs = glob(["**/*.ts"]),
79
data = [
810
"//tests/legacy-cli/e2e/ng-snapshot",
911
],
10-
visibility = ["//visibility:public"],
1112
deps = [
12-
"@npm//@types/semver",
13-
"@npm//ansi-colors",
14-
"@npm//fast-glob",
15-
"@npm//npm",
16-
"@npm//protractor",
17-
"@npm//rxjs",
18-
"@npm//semver",
19-
"@npm//tar",
20-
"@npm//tree-kill",
21-
"@npm//verdaccio",
22-
"@npm//verdaccio-auth-memory",
13+
"//:root_modules/@types/jasmine",
14+
"//:root_modules/@types/semver",
15+
"//:root_modules/ansi-colors",
16+
"//:root_modules/fast-glob",
17+
"//:root_modules/npm",
18+
"//:root_modules/protractor",
19+
"//:root_modules/rxjs",
20+
"//:root_modules/semver",
21+
"//:root_modules/tar",
22+
"//:root_modules/tree-kill",
23+
"//:root_modules/verdaccio",
24+
"//:root_modules/verdaccio-auth-memory",
2325
],
2426
)

tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"**/node_modules/**/*",
4444
"**/third_party/**/*",
4545
"packages/angular_devkit/schematics_cli/schematic/files/**/*",
46-
"packages/angular_devkit/*/test/**/*",
47-
"tests/**/*"
46+
"packages/angular_devkit/*/test/**/*"
4847
]
4948
}

0 commit comments

Comments
 (0)