angular/packages/platform-server/test/BUILD.bazel
Alan Agius c1579163b7 build: consolidate domino bundling in platform-server
Move the domino bundling logic and related shims into a centralized third_party directory within packages/platform-server. This avoids duplication of the bundling logic and ensures consistent shimming across the platform-server package and its entry points.

Following a conversation with OSS licensing, this change also includes the domino LICENSE file in the generated npm package to comply with licensing requirements for bundled third-party code.

```
├── fesm2022
│   ├── init.mjs
│   ├── init.mjs.map
│   ├── platform-server.mjs
│   ├── platform-server.mjs.map
│   ├── _server-chunk.mjs
│   ├── _server-chunk.mjs.map
│   ├── testing.mjs
│   └── testing.mjs.map
├── LICENSE
├── package.json
├── README.md
├── third_party
│   └── domino
│       ├── bundled-domino.d.ts
│       ├── bundled-domino.mjs
│       ├── bundled-domino.mjs.map
│       └── LICENSE
└── types
    ├── init.d.ts
    ├── platform-server.d.ts
    └── testing.d.ts
```

(cherry picked from commit b40d11eec4)
2026-03-25 13:31:10 -07:00

83 lines
2.1 KiB
Text

load("//tools:defaults.bzl", "angular_jasmine_test", "ts_project", "zoneless_jasmine_test")
ts_project(
name = "dom_utils",
testonly = True,
srcs = [
"dom_utils.ts",
"hydration_utils.ts",
],
deps = [
"//packages/common",
"//packages/core",
"//packages/platform-browser",
"//packages/platform-server",
],
)
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.ts"],
exclude = [
"event_replay_spec.ts",
"hydration_utils.ts",
"dom_utils.ts",
],
),
deps = [
":dom_utils",
"//:node_modules/rxjs",
"//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",
"//packages/localize/init",
"//packages/platform-browser",
"//packages/platform-browser/animations",
"//packages/platform-server",
"//packages/platform-server/third_party/domino:bundled_domino_lib",
"//packages/private/testing",
"//packages/router",
],
)
ts_project(
name = "event_replay_test_lib",
testonly = True,
srcs = ["event_replay_spec.ts"],
deps = [
":dom_utils",
"//packages/common",
"//packages/core",
"//packages/core/primitives/event-dispatch",
"//packages/core/testing",
"//packages/platform-browser",
"//packages/platform-server",
"//packages/private/testing",
],
)
# This target is meant to run with Zone.js as some test cases are shared between Zone & Zoneless.
angular_jasmine_test(
name = "test",
data = [
":test_lib",
"//packages/core/primitives/event-dispatch:contract_bundle_min",
],
)
zoneless_jasmine_test(
name = "event_replay_test",
data = [
":event_replay_test_lib",
"//packages/core/primitives/event-dispatch:contract_bundle_min",
],
)