mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
We don't need this tooling anymore because we are already validating that there are no circular dependencies via the `ng-dev` tooling that checks `.ts` files directly. Also these tests never actually failed to my knowledge. PR Close #61209
120 lines
3.2 KiB
Text
120 lines
3.2 KiB
Text
load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
genrule(
|
|
name = "downleveled_es5_fixture",
|
|
srcs = ["reflection/es2015_inheritance_fixture.ts"],
|
|
outs = ["reflection/es5_downleveled_inheritance_fixture.js"],
|
|
cmd = """
|
|
es2015_out_dir="/tmp/downleveled_es5_fixture/"
|
|
es2015_out_file="$$es2015_out_dir/es2015_inheritance_fixture.js"
|
|
|
|
# Build the ES2015 output and then downlevel it to ES5.
|
|
$(execpath @npm//typescript/bin:tsc) $< --outDir $$es2015_out_dir --target ES2015 \
|
|
--types --module umd
|
|
$(execpath @npm//typescript/bin:tsc) --outFile $@ $$es2015_out_file --allowJs \
|
|
--types --target ES5 --downlevelIteration
|
|
""",
|
|
tools = ["@npm//typescript/bin:tsc"],
|
|
)
|
|
|
|
UTILS = [
|
|
"linker/source_map_util.ts",
|
|
]
|
|
|
|
ts_library(
|
|
name = "test_utils",
|
|
testonly = True,
|
|
srcs = UTILS,
|
|
deps = [
|
|
"//packages/compiler",
|
|
"@npm//source-map",
|
|
],
|
|
)
|
|
|
|
ts_library(
|
|
name = "test_lib",
|
|
testonly = True,
|
|
srcs = glob(
|
|
["**/*.ts"],
|
|
exclude = UTILS + [
|
|
"**/*_node_only_spec.ts",
|
|
"reflection/es2015_inheritance_fixture.ts",
|
|
],
|
|
),
|
|
# Visible to //:saucelabs_unit_tests_poc target
|
|
visibility = ["//:__pkg__"],
|
|
deps = [
|
|
":test_utils",
|
|
"//packages/animations",
|
|
"//packages/animations/browser",
|
|
"//packages/animations/browser/testing",
|
|
"//packages/common",
|
|
"//packages/common/locales",
|
|
"//packages/compiler",
|
|
"//packages/core",
|
|
"//packages/core/rxjs-interop",
|
|
"//packages/core/src/di/interface",
|
|
"//packages/core/src/interface",
|
|
"//packages/core/src/reflection",
|
|
"//packages/core/src/util",
|
|
"//packages/core/testing",
|
|
"//packages/localize/init",
|
|
"//packages/platform-browser",
|
|
"//packages/platform-browser/animations",
|
|
"//packages/platform-browser/testing",
|
|
"//packages/platform-server",
|
|
"//packages/private/testing",
|
|
"//packages/router",
|
|
"//packages/router/testing",
|
|
"//packages/zone.js/lib:zone_d_ts",
|
|
"@npm//rxjs",
|
|
],
|
|
)
|
|
|
|
ts_library(
|
|
name = "test_node_only_lib",
|
|
testonly = True,
|
|
srcs = glob(
|
|
["**/*_node_only_spec.ts"],
|
|
exclude = UTILS,
|
|
),
|
|
deps = [
|
|
":test_lib",
|
|
":test_utils",
|
|
"//packages/compiler",
|
|
"//packages/core",
|
|
"//packages/core/src/compiler",
|
|
"//packages/core/testing",
|
|
"//packages/platform-server",
|
|
"//packages/platform-server/testing",
|
|
"//packages/private/testing",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "test",
|
|
bootstrap = ["//tools/testing:node"],
|
|
data = [
|
|
":downleveled_es5_fixture",
|
|
],
|
|
shard_count = 4,
|
|
deps = [
|
|
":test_lib",
|
|
":test_node_only_lib",
|
|
"//packages/platform-server",
|
|
"//packages/platform-server/testing",
|
|
"//packages/zone.js/lib:zone_d_ts",
|
|
"@npm//source-map",
|
|
],
|
|
)
|
|
|
|
karma_web_test_suite(
|
|
name = "test_web",
|
|
external = ["@angular/platform-server"],
|
|
runtime_deps = [":downleveled_es5_fixture"],
|
|
deps = [
|
|
":test_lib",
|
|
],
|
|
)
|