angular/packages/zone.js/test/zone-spec/clock-tests/BUILD.bazel
Paul Gschwendtner cc5d3b75e2 refactor: update zone.js and tests to work with ESM (#48521)
* Adjusts tests to no longer rely on CommonJS features. Switches them to
  ESM
* Updates test initialization files to not double-initialize Jasmine now
  that bootstrap files are loaded after Jasmine. The `jasmine.boot`
  setup was hacky from `rules_nodejs` and will break in the future
  regardless if we e.g. use `rules_js` with actual unmodified `jasmine`.

PR Close #48521
2022-12-19 19:50:44 +00:00

58 lines
1.1 KiB
Text

load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
ts_library(
name = "patched_init",
testonly = True,
srcs = [
"enable-clock-patch.ts",
"patched.init.ts",
],
deps = [
"//packages/zone.js/test:node_entry_point",
],
)
ts_library(
name = "test_patched_lib",
testonly = True,
srcs = [
"fake-async-patched-clock.spec.ts",
],
deps = [
"//packages/zone.js/lib:zone_d_ts",
],
)
ts_library(
name = "unpatched_init",
testonly = True,
srcs = [
"unpatched.init.ts",
],
deps = [
"//packages/zone.js/test:node_entry_point",
],
)
ts_library(
name = "test_unpatched_lib",
testonly = True,
srcs = [
"fake-async-unpatched-clock.spec.ts",
],
deps = [
"//packages/zone.js/lib:zone_d_ts",
],
)
jasmine_node_test(
name = "test_patched",
bootstrap = [":patched_init"],
deps = [":test_patched_lib"],
)
jasmine_node_test(
name = "test_unpatched",
bootstrap = [":unpatched_init"],
deps = [":test_unpatched_lib"],
)