Files
Paul Gschwendtner 8e54b5773f build: move private testing helpers outside platform-browser/testing (#61571)
These helpers are often imported by various tests throughout the
repository, but the helpers aren't exported/exposed from the public
entry-point; even though they confusingly reside in there.

This commit fixes this, and moves the helpers into
`packages/private/testing`. This is a preparation for the `ts_project`
migration where we don't want to leverage deep imports between packages.

PR Close #61571
2025-05-21 16:04:42 +00:00

64 lines
1.4 KiB
Python

load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
# Test that should only be run in node
NODE_ONLY = [
"**/*_node_only_spec.ts",
"aot/**/*.ts",
]
ts_library(
name = "test_lib",
testonly = True,
srcs = glob(
["**/*.ts"],
exclude = NODE_ONLY,
),
deps = [
"//packages:types",
"//packages/common",
"//packages/compiler",
"//packages/compiler/test/expression_parser/utils",
"//packages/compiler/test/ml_parser/util",
"//packages/core",
"//packages/core/src/compiler",
"//packages/core/testing",
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
"//packages/platform-browser/testing",
"//packages/private/testing",
"@npm//source-map",
],
)
ts_library(
name = "test_node_only_lib",
testonly = True,
srcs = glob(
NODE_ONLY,
),
deps = [
":test_lib",
"//packages/compiler",
"//packages/compiler/test/expression_parser/utils",
"//packages/core",
"@npm//typescript",
],
)
jasmine_node_test(
name = "test",
bootstrap = ["//tools/testing:node"],
deps = [
":test_lib",
":test_node_only_lib",
"@npm//source-map",
],
)
karma_web_test_suite(
name = "test_web",
deps = [
":test_lib",
],
)