-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Expand file tree
/
Copy pathBUILD.bazel
More file actions
76 lines (67 loc) · 1.84 KB
/
BUILD.bazel
File metadata and controls
76 lines (67 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
load("@bazel_lib//lib:directory_path.bzl", "directory_path")
load("@npm//:@rollup/wasm-node/package_json.bzl", rollup = "bin")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults.bzl", "ts_project")
load(":e2e.bzl", "e2e_suites")
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
npm_link_all_packages()
ts_project(
name = "runner",
testonly = True,
srcs = [
"e2e_runner.ts",
],
deps = [
"//:node_modules/@types/node",
"//:node_modules/fast-glob",
"//tests/e2e/utils",
],
)
rollup.rollup(
name = "runner_bundled",
testonly = True,
srcs = [
"rollup.config.mjs",
":runner",
"//:node_modules/@rollup/plugin-commonjs",
"//:node_modules/@rollup/plugin-json",
"//:node_modules/@rollup/plugin-node-resolve",
"//:node_modules/fast-glob",
"//tests/e2e/initialize",
"//tests/e2e/ng-snapshot",
"//tests/e2e/setup",
"//tests/e2e/tests",
],
args = [
"--format=cjs",
"--config=./rollup.config.mjs",
],
chdir = package_name(),
out_dirs = ["runner_bundled_out"],
progress_message = "Bundling e2e test runner",
)
directory_path(
name = "runner_entrypoint",
testonly = True,
directory = ":runner_bundled",
path = "./e2e_runner.js",
)
e2e_suites(
name = "e2e",
data = [
":runner_bundled",
"verdaccio.yaml",
"verdaccio_auth.yaml",
# Dynamically loaded.
"//tests/e2e/assets",
"//:node_modules/verdaccio",
"//:node_modules/verdaccio-auth-memory",
# Extra runtime deps due to bundling issues.
# TODO: Clean this up.
"//:node_modules/express",
"//:node_modules/undici",
"//:node_modules/puppeteer",
],
runner = ":runner_entrypoint",
)