Greg Magolan 9bb349e1c8 refactor: handle breaking changes in rules_nodejs 1.0.0 (#34589)
The major one that affects the angular repo is the removal of the bootstrap attribute in nodejs_binary, nodejs_test and jasmine_node_test in favor of using templated_args --node_options=--require=/path/to/script. The side-effect of this is that the bootstrap script does not get the require.resolve patches with explicitly loading the targets _loader.js file.

PR Close #34589
2020-01-10 08:31:59 -08:00

56 lines
1.4 KiB
Python

load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
# check_types_spec
ts_library(
name = "check_types_lib",
testonly = True,
srcs = ["check_types_spec.ts"],
deps = [
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"@npm//typescript",
],
)
jasmine_node_test(
name = "check_types",
timeout = "long", # 900 seconds
data = [
"//packages/common:npm_package",
"//packages/core:npm_package",
],
tags = [
# Disabled as these tests pertain to typechecking in the old ngc compiler. The Ivy ngtsc
# compiler has its own typechecking implementation and tests.
"no-ivy-aot",
],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [
":check_types_lib",
"//packages/core",
"//tools/testing:node",
"//tools/testing:node_es5",
],
)
# typescript_version_spec
ts_library(
name = "typescript_version_lib",
testonly = True,
srcs = ["typescript_version_spec.ts"],
deps = [
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
],
)
jasmine_node_test(
name = "typescript_version",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [
":typescript_version_lib",
"//tools/testing:node",
"//tools/testing:node_es5",
],
)