mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
* 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
58 lines
1.1 KiB
Text
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"],
|
|
)
|