angular/packages/platform-server/test/BUILD.bazel
Andrew Kushnir 478c5ac150 refactor(core): internal tracker of pending tasks during initial rendering (#49576)
This commit implements a simple tracker of the pending tasks during initial rendering. The class allows adding and removing tasks from the set. The class also exposes a promise that gets resolved once the last task is removed.

This tracker is needed to keep track of ongoing processes like Router navigation (and potentially HTTP requests) and acts as a signaling mechanism to SSR and hydration that the application is in the "stable" state and a serialization can be performed.

This class would also act as a future replacement for the `ApplicationRef.isStable` for zoneless applications.

PR Close #49576
2023-03-28 16:19:31 -07:00

45 lines
1.2 KiB
Text

load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")
circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/platform-server/index.mjs",
deps = ["//packages/platform-server"],
)
circular_dependency_test(
name = "testing_circular_deps_test",
entry_point = "angular/packages/platform-server/testing/index.mjs",
deps = ["//packages/platform-server/testing"],
)
ts_library(
name = "test_lib",
testonly = True,
srcs = glob(["**/*.ts"]),
deps = [
"//packages:types",
"//packages/animations",
"//packages/common",
"//packages/common/http",
"//packages/common/http/testing",
"//packages/common/testing",
"//packages/compiler",
"//packages/core",
"//packages/core/testing",
"//packages/localize/init",
"//packages/platform-browser",
"//packages/platform-server",
"//packages/private/testing",
"//packages/router",
"@npm//rxjs",
],
)
jasmine_node_test(
name = "test",
bootstrap = ["//tools/testing:node"],
deps = [
":test_lib",
],
)