angular-docs-cn/packages/bazel/test/ng_package/BUILD.bazel

85 lines
1.9 KiB
Python
Raw Normal View History

load("//tools:defaults.bzl", "jasmine_node_test", "nodejs_binary", "ts_library")
exports_files(["package.json"])
# The tests in this package must run in separate targets, since they change
# working directory and therefore have mutable global state that causes test
# isolation failures.
ts_library(
name = "core_spec_lib",
testonly = True,
srcs = ["core_package.spec.ts"],
deps = [
"//packages:types",
"@ngdeps//@types/shelljs",
],
)
jasmine_node_test(
name = "core_package",
srcs = [":core_spec_lib"],
data = [
"//packages/core:npm_package",
"@ngdeps//@types/shelljs",
"@ngdeps//shelljs",
],
tags = [
"fixme-ivy-aot",
],
)
ts_library(
name = "common_spec_lib",
testonly = True,
srcs = ["common_package.spec.ts"],
deps = [
"//packages:types",
"@ngdeps//@types/shelljs",
],
)
jasmine_node_test(
name = "common_package",
srcs = [":common_spec_lib"],
data = [
"//packages/common:npm_package",
"@ngdeps//shelljs",
],
)
ts_library(
name = "example_spec_lib",
testonly = True,
srcs = ["example_package.spec.ts"],
deps = [
"//packages:types",
"@ngdeps//@types/diff",
],
)
jasmine_node_test(
name = "example_package",
srcs = [":example_spec_lib"],
data = [
"example_package.golden",
"//packages/bazel/test/ng_package/example:npm_package",
],
# TODO(alexeagle): re-enable this test
# see https://github.com/angular/angular/pull/22933
tags = ["manual"],
deps = ["@ngdeps//diff"],
)
nodejs_binary(
name = "example_package.accept",
testonly = True,
data = [
"example_package.golden",
":example_spec_lib",
"//packages/bazel/test/ng_package/example:npm_package",
],
entry_point = "angular/packages/bazel/test/ng_package/example_package.spec.js",
templated_args = ["--accept"],
)