Greg Magolan 9a68f23dd2 build: ts_web_test & ts_web_test_suite deprecated in favor of karma_web_test & karma_web_test_suite (#33802)
This is a breaking change in nodejs rules 0.40.0 as part of the API review & cleanup for the 1.0 release. Their APIs are identical as ts_web_test was just karma_web_test without the config_file attribute.

PR Close #33802
2019-11-13 13:33:38 -08:00

82 lines
2.2 KiB
Python

load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "test_lib",
testonly = True,
srcs = glob(
["**/*.ts"],
exclude = [
"**/*_node_only_spec.ts",
],
),
# Visible to //:test_web_all target
visibility = ["//:__pkg__"],
deps = [
"//packages/animations",
"//packages/animations/browser",
"//packages/animations/browser/testing",
"//packages/common",
"//packages/common/locales",
"//packages/compiler",
"//packages/compiler/testing",
"//packages/core",
"//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-dynamic",
"//packages/platform-browser/animations",
"//packages/platform-browser/testing",
"//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"]),
deps = [
":test_lib",
"//packages/compiler",
"//packages/compiler/testing",
"//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 = ["angular/tools/testing/init_node_spec.js"],
shard_count = 4,
deps = [
":test_lib",
":test_node_only_lib",
"//packages/platform-server",
"//packages/platform-server/testing",
"//packages/zone.js/lib:zone_d_ts",
"//tools/testing:node",
"@npm//base64-js",
"@npm//source-map",
],
)
karma_web_test_suite(
name = "test_web",
deps = [
":test_lib",
],
)