From da4782e67f662d37dccb89f9c642897c1266f4ce Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Tue, 7 Jan 2020 23:56:49 -0800 Subject: [PATCH] test: handle bootstrap templated_args in jasmine_node_test defaults.bzl (#34589) PR Close #34589 --- packages/animations/browser/test/BUILD.bazel | 3 +-- packages/animations/test/BUILD.bazel | 3 +-- packages/bazel/src/schematics/BUILD.bazel | 3 +-- packages/benchpress/test/BUILD.bazel | 3 +-- packages/common/http/test/BUILD.bazel | 3 +-- packages/common/http/testing/test/BUILD.bazel | 3 +-- packages/common/test/BUILD.bazel | 3 +-- packages/common/upgrade/test/BUILD.bazel | 3 +-- .../bazel/injectable_def/app/test/BUILD.bazel | 3 +-- .../ivy_build/app/test/BUILD.bazel | 3 +-- packages/compiler-cli/ngcc/test/BUILD.bazel | 6 ++---- .../src/ngtsc/annotations/test/BUILD.bazel | 3 +-- .../src/ngtsc/cycles/test/BUILD.bazel | 3 +-- .../src/ngtsc/entry_point/test/BUILD.bazel | 3 +-- .../src/ngtsc/file_system/test/BUILD.bazel | 3 +-- .../src/ngtsc/imports/test/BUILD.bazel | 3 +-- .../src/ngtsc/indexer/test/BUILD.bazel | 3 +-- .../ngtsc/partial_evaluator/test/BUILD.bazel | 3 +-- .../src/ngtsc/reflection/test/BUILD.bazel | 3 +-- .../src/ngtsc/scope/test/BUILD.bazel | 3 +-- .../src/ngtsc/shims/test/BUILD.bazel | 3 +-- .../src/ngtsc/typecheck/test/BUILD.bazel | 3 +-- .../src/ngtsc/util/test/BUILD.bazel | 3 +-- packages/compiler-cli/test/BUILD.bazel | 12 ++++-------- .../compiler-cli/test/compliance/BUILD.bazel | 3 +-- .../compiler-cli/test/diagnostics/BUILD.bazel | 6 ++---- .../compiler-cli/test/metadata/BUILD.bazel | 3 +-- packages/compiler-cli/test/ngtsc/BUILD.bazel | 3 +-- .../compiler-cli/test/transformers/BUILD.bazel | 3 +-- packages/compiler/test/BUILD.bazel | 3 +-- packages/compiler/test/css_parser/BUILD.bazel | 3 +-- .../test/expression_parser/BUILD.bazel | 3 +-- packages/compiler/test/ml_parser/BUILD.bazel | 3 +-- packages/compiler/test/render3/BUILD.bazel | 3 +-- packages/compiler/test/selector/BUILD.bazel | 3 +-- packages/core/test/BUILD.bazel | 3 +-- packages/core/test/acceptance/BUILD.bazel | 3 +-- packages/core/test/render3/BUILD.bazel | 3 +-- packages/core/test/render3/ivy/BUILD.bazel | 3 +-- packages/core/test/view/BUILD.bazel | 3 +-- packages/examples/core/BUILD.bazel | 3 +-- packages/examples/core/testing/ts/BUILD.bazel | 3 +-- packages/forms/test/BUILD.bazel | 3 +-- packages/http/test/BUILD.bazel | 3 +-- .../localize/schematics/ng-add/BUILD.bazel | 3 +-- .../localize/src/localize/test/BUILD.bazel | 3 +-- packages/localize/src/tools/test/BUILD.bazel | 3 +-- .../test/translate/integration/BUILD.bazel | 3 +-- packages/localize/src/utils/test/BUILD.bazel | 3 +-- packages/localize/test/BUILD.bazel | 3 +-- .../platform-browser-dynamic/test/BUILD.bazel | 3 +-- .../animations/test/BUILD.bazel | 3 +-- packages/platform-browser/test/BUILD.bazel | 3 +-- packages/platform-server/test/BUILD.bazel | 3 +-- packages/platform-webworker/test/BUILD.bazel | 3 +-- packages/router/test/BUILD.bazel | 3 +-- .../router/test/aot_ngsummary_test/BUILD.bazel | 3 +-- .../service-worker/config/test/BUILD.bazel | 3 +-- packages/service-worker/test/BUILD.bazel | 3 +-- packages/zone.js/test/BUILD.bazel | 15 +++++---------- tools/defaults.bzl | 18 ++++++++++++++---- 61 files changed, 83 insertions(+), 142 deletions(-) diff --git a/packages/animations/browser/test/BUILD.bazel b/packages/animations/browser/test/BUILD.bazel index 36b06e16ee..ef3d1cbad5 100644 --- a/packages/animations/browser/test/BUILD.bazel +++ b/packages/animations/browser/test/BUILD.bazel @@ -16,11 +16,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/animations/test/BUILD.bazel b/packages/animations/test/BUILD.bazel index ce00fd01a7..1c885f37c9 100644 --- a/packages/animations/test/BUILD.bazel +++ b/packages/animations/test/BUILD.bazel @@ -13,11 +13,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/bazel/src/schematics/BUILD.bazel b/packages/bazel/src/schematics/BUILD.bazel index 15f8f5a4aa..27920ea2b3 100644 --- a/packages/bazel/src/schematics/BUILD.bazel +++ b/packages/bazel/src/schematics/BUILD.bazel @@ -12,12 +12,11 @@ filegroup( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ "//packages/bazel/src/schematics/ng-add:test", "//packages/bazel/src/schematics/ng-new:test", "//packages/bazel/src/schematics/utility:test", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/benchpress/test/BUILD.bazel b/packages/benchpress/test/BUILD.bazel index 7b89609fb4..cd8a741505 100644 --- a/packages/benchpress/test/BUILD.bazel +++ b/packages/benchpress/test/BUILD.bazel @@ -15,13 +15,12 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//packages/benchpress", "//packages/core/testing", "//tools/testing:node", - "//tools/testing:node_es5", "@npm//protractor", ], ) diff --git a/packages/common/http/test/BUILD.bazel b/packages/common/http/test/BUILD.bazel index a37e1741d7..8d8dacf4cf 100644 --- a/packages/common/http/test/BUILD.bazel +++ b/packages/common/http/test/BUILD.bazel @@ -19,11 +19,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/common/http/testing/test/BUILD.bazel b/packages/common/http/testing/test/BUILD.bazel index 3aff5b14d3..7f62aa25d0 100644 --- a/packages/common/http/testing/test/BUILD.bazel +++ b/packages/common/http/testing/test/BUILD.bazel @@ -17,11 +17,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/common/test/BUILD.bazel b/packages/common/test/BUILD.bazel index 613031ca40..45b9e870f3 100644 --- a/packages/common/test/BUILD.bazel +++ b/packages/common/test/BUILD.bazel @@ -24,11 +24,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/common/upgrade/test/BUILD.bazel b/packages/common/upgrade/test/BUILD.bazel index 9e9b56167e..c53d69ac1c 100644 --- a/packages/common/upgrade/test/BUILD.bazel +++ b/packages/common/upgrade/test/BUILD.bazel @@ -16,10 +16,9 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel b/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel index c734409217..3db9a33de5 100644 --- a/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel +++ b/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel @@ -21,13 +21,12 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//packages/platform-server", "//packages/platform-server/testing", "//packages/private/testing", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel b/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel index b373b4cb48..c11eb18639 100644 --- a/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel +++ b/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel @@ -22,13 +22,12 @@ ts_library( jasmine_node_test( name = "test", + bootstrap = ["//tools/testing:node_es5"], tags = [ "ivy-only", ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/compiler-cli/ngcc/test/BUILD.bazel b/packages/compiler-cli/ngcc/test/BUILD.bazel index d7b53adfe0..bb5732b09a 100644 --- a/packages/compiler-cli/ngcc/test/BUILD.bazel +++ b/packages/compiler-cli/ngcc/test/BUILD.bazel @@ -33,13 +33,12 @@ ts_library( jasmine_node_test( name = "test", + bootstrap = ["//tools/testing:node_no_angular_es5"], data = [ "//packages/compiler-cli/test/ngtsc/fake_core:npm_package", ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) @@ -64,6 +63,7 @@ ts_library( jasmine_node_test( name = "integration", timeout = "long", + bootstrap = ["//tools/testing:node_no_angular_es5"], data = [ "//packages/common:npm_package", "//packages/core:npm_package", @@ -74,10 +74,8 @@ jasmine_node_test( # Disabled in AOT mode because we want ngcc to compile non-AOT Angular packages. "no-ivy-aot", ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], deps = [ ":integration_lib", - "//tools/testing:node_no_angular_es5", "@npm//canonical-path", "@npm//convert-source-map", ], diff --git a/packages/compiler-cli/src/ngtsc/annotations/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/annotations/test/BUILD.bazel index e6a1ebd716..5e8b56b3c7 100644 --- a/packages/compiler-cli/src/ngtsc/annotations/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/annotations/test/BUILD.bazel @@ -29,9 +29,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/src/ngtsc/cycles/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/cycles/test/BUILD.bazel index d95434faa0..81efd86e91 100644 --- a/packages/compiler-cli/src/ngtsc/cycles/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/cycles/test/BUILD.bazel @@ -21,9 +21,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/src/ngtsc/entry_point/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/entry_point/test/BUILD.bazel index ef595d45ee..7895a91330 100644 --- a/packages/compiler-cli/src/ngtsc/entry_point/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/entry_point/test/BUILD.bazel @@ -19,9 +19,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/src/ngtsc/file_system/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/file_system/test/BUILD.bazel index a84c321523..7ce1121b43 100644 --- a/packages/compiler-cli/src/ngtsc/file_system/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/file_system/test/BUILD.bazel @@ -18,9 +18,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/src/ngtsc/imports/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/imports/test/BUILD.bazel index 5c35f76a07..44f7f734c1 100644 --- a/packages/compiler-cli/src/ngtsc/imports/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/imports/test/BUILD.bazel @@ -22,9 +22,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/src/ngtsc/indexer/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/indexer/test/BUILD.bazel index 050f641cc2..0fa0fc3270 100644 --- a/packages/compiler-cli/src/ngtsc/indexer/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/indexer/test/BUILD.bazel @@ -23,9 +23,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/src/ngtsc/partial_evaluator/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/partial_evaluator/test/BUILD.bazel index ec5d9b848a..fce987b98d 100644 --- a/packages/compiler-cli/src/ngtsc/partial_evaluator/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/partial_evaluator/test/BUILD.bazel @@ -24,9 +24,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/src/ngtsc/reflection/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/reflection/test/BUILD.bazel index c99d53bdb1..0ef634cd56 100644 --- a/packages/compiler-cli/src/ngtsc/reflection/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/reflection/test/BUILD.bazel @@ -20,9 +20,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/src/ngtsc/scope/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/scope/test/BUILD.bazel index 4f2c3e3556..0bb4dea66f 100644 --- a/packages/compiler-cli/src/ngtsc/scope/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/scope/test/BUILD.bazel @@ -24,9 +24,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/src/ngtsc/shims/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/shims/test/BUILD.bazel index ff3b3ae3f0..97fe53bf43 100644 --- a/packages/compiler-cli/src/ngtsc/shims/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/shims/test/BUILD.bazel @@ -17,9 +17,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/src/ngtsc/typecheck/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/typecheck/test/BUILD.bazel index 1095455226..8aebe02977 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/typecheck/test/BUILD.bazel @@ -24,9 +24,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/src/ngtsc/util/test/BUILD.bazel b/packages/compiler-cli/src/ngtsc/util/test/BUILD.bazel index afd93119be..58c32aab77 100644 --- a/packages/compiler-cli/src/ngtsc/util/test/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/util/test/BUILD.bazel @@ -20,9 +20,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/test/BUILD.bazel b/packages/compiler-cli/test/BUILD.bazel index 3b93ae4062..85c573e16a 100644 --- a/packages/compiler-cli/test/BUILD.bazel +++ b/packages/compiler-cli/test/BUILD.bazel @@ -40,6 +40,7 @@ ts_library( jasmine_node_test( name = "extract_i18n", + bootstrap = ["//tools/testing:node_es5"], data = [ "//packages/core:npm_package", ], @@ -48,13 +49,11 @@ jasmine_node_test( # tool will likely work differently. "no-ivy-aot", ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], deps = [ ":extract_i18n_lib", "//packages/common:npm_package", "//packages/core", "//tools/testing:node", - "//tools/testing:node_es5", "@npm//minimist", ], ) @@ -77,6 +76,7 @@ ts_library( jasmine_node_test( name = "ngc", timeout = "long", # 900 seconds + bootstrap = ["//tools/testing:node_es5"], data = [ "//packages/common:npm_package", "//packages/core:npm_package", @@ -88,12 +88,10 @@ jasmine_node_test( # own tests under //packages/compiler-cli/test/ngtsc. "no-ivy-aot", ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], deps = [ ":ngc_lib", "//packages/core", "//tools/testing:node", - "//tools/testing:node_es5", "@npm//minimist", "@npm//rxjs", "@npm//tsickle", @@ -118,15 +116,14 @@ ts_library( jasmine_node_test( name = "perform_watch", + bootstrap = ["//tools/testing:node_es5"], data = [ "//packages/core:npm_package", ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], deps = [ ":perform_watch_lib", "//packages/core", "//tools/testing:node", - "//tools/testing:node_es5", ], ) @@ -146,14 +143,13 @@ ts_library( jasmine_node_test( name = "perform_compile", + bootstrap = ["//tools/testing:node_es5"], data = [ "//packages/core:npm_package", ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], deps = [ ":perform_compile_lib", "//packages/core", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/compiler-cli/test/compliance/BUILD.bazel b/packages/compiler-cli/test/compliance/BUILD.bazel index 4376113e42..d238d225a8 100644 --- a/packages/compiler-cli/test/compliance/BUILD.bazel +++ b/packages/compiler-cli/test/compliance/BUILD.bazel @@ -18,6 +18,7 @@ ts_library( jasmine_node_test( name = "compliance", + bootstrap = ["//tools/testing:node_no_angular_es5"], data = [ "//packages/compiler-cli/test/ngtsc/fake_core:npm_package", ], @@ -25,9 +26,7 @@ jasmine_node_test( tags = [ "ivy-only", ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/compiler-cli/test/diagnostics/BUILD.bazel b/packages/compiler-cli/test/diagnostics/BUILD.bazel index be532176ae..c03ed465aa 100644 --- a/packages/compiler-cli/test/diagnostics/BUILD.bazel +++ b/packages/compiler-cli/test/diagnostics/BUILD.bazel @@ -15,6 +15,7 @@ ts_library( jasmine_node_test( name = "check_types", timeout = "long", # 900 seconds + bootstrap = ["//tools/testing:node_es5"], data = [ "//packages/common:npm_package", "//packages/core:npm_package", @@ -24,12 +25,10 @@ jasmine_node_test( # 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", ], ) @@ -46,10 +45,9 @@ ts_library( jasmine_node_test( name = "typescript_version", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":typescript_version_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/compiler-cli/test/metadata/BUILD.bazel b/packages/compiler-cli/test/metadata/BUILD.bazel index 948b2ae195..db6e8a9b73 100644 --- a/packages/compiler-cli/test/metadata/BUILD.bazel +++ b/packages/compiler-cli/test/metadata/BUILD.bazel @@ -16,13 +16,12 @@ ts_library( jasmine_node_test( name = "test", + bootstrap = ["//tools/testing:node_es5"], data = [ ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], deps = [ ":test_lib", "//packages/core", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/compiler-cli/test/ngtsc/BUILD.bazel b/packages/compiler-cli/test/ngtsc/BUILD.bazel index a04f658deb..62467c93d9 100644 --- a/packages/compiler-cli/test/ngtsc/BUILD.bazel +++ b/packages/compiler-cli/test/ngtsc/BUILD.bazel @@ -23,14 +23,13 @@ ts_library( jasmine_node_test( name = "ngtsc", timeout = "long", + bootstrap = ["//tools/testing:node_no_angular_es5"], data = [ "//packages/compiler-cli/test/ngtsc/fake_core:npm_package", ], shard_count = 4, - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], deps = [ ":ngtsc_lib", - "//tools/testing:node_no_angular_es5", "@npm//minimist", ], ) diff --git a/packages/compiler-cli/test/transformers/BUILD.bazel b/packages/compiler-cli/test/transformers/BUILD.bazel index 245858cf0d..c399ce8a37 100644 --- a/packages/compiler-cli/test/transformers/BUILD.bazel +++ b/packages/compiler-cli/test/transformers/BUILD.bazel @@ -19,6 +19,7 @@ ts_library( jasmine_node_test( name = "test", timeout = "long", # 900 seconds + bootstrap = ["//tools/testing:node_es5"], data = [ "//packages/common:npm_package", "//packages/core:npm_package", @@ -29,12 +30,10 @@ jasmine_node_test( # of these transformer utilities. "no-ivy-aot", ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], deps = [ ":test_lib", "//packages/core", "//tools/testing:node", - "//tools/testing:node_es5", "@npm//source-map", ], ) diff --git a/packages/compiler/test/BUILD.bazel b/packages/compiler/test/BUILD.bazel index 357bb2e322..3c97fe8753 100644 --- a/packages/compiler/test/BUILD.bazel +++ b/packages/compiler/test/BUILD.bazel @@ -70,6 +70,7 @@ ts_library( jasmine_node_test( name = "test", + bootstrap = ["//tools/testing:node_es5"], data = [ "//packages/animations:npm_package", "//packages/common:npm_package", @@ -79,12 +80,10 @@ jasmine_node_test( # Disabled as these tests pertain to the old ngc compilation and are not relevant in Ivy. "no-ivy-aot", ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], deps = [ ":test_lib", ":test_node_only_lib", "//tools/testing:node", - "//tools/testing:node_es5", "@npm//base64-js", "@npm//source-map", ], diff --git a/packages/compiler/test/css_parser/BUILD.bazel b/packages/compiler/test/css_parser/BUILD.bazel index ec6c66eab0..c8d2ef5cfb 100644 --- a/packages/compiler/test/css_parser/BUILD.bazel +++ b/packages/compiler/test/css_parser/BUILD.bazel @@ -16,11 +16,10 @@ ts_library( jasmine_node_test( name = "css_parser", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":css_parser_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/compiler/test/expression_parser/BUILD.bazel b/packages/compiler/test/expression_parser/BUILD.bazel index 3f1b032c4d..42fe916bcb 100644 --- a/packages/compiler/test/expression_parser/BUILD.bazel +++ b/packages/compiler/test/expression_parser/BUILD.bazel @@ -15,11 +15,10 @@ ts_library( jasmine_node_test( name = "expression_parser", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":expression_parser_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/compiler/test/ml_parser/BUILD.bazel b/packages/compiler/test/ml_parser/BUILD.bazel index e399b5f2d7..6a87c18211 100644 --- a/packages/compiler/test/ml_parser/BUILD.bazel +++ b/packages/compiler/test/ml_parser/BUILD.bazel @@ -13,11 +13,10 @@ ts_library( jasmine_node_test( name = "ml_parser", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":ml_parser_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/compiler/test/render3/BUILD.bazel b/packages/compiler/test/render3/BUILD.bazel index d6a0769da9..a3a1540705 100644 --- a/packages/compiler/test/render3/BUILD.bazel +++ b/packages/compiler/test/render3/BUILD.bazel @@ -18,10 +18,9 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/compiler/test/selector/BUILD.bazel b/packages/compiler/test/selector/BUILD.bazel index 5d49d1abbc..278775f1f6 100644 --- a/packages/compiler/test/selector/BUILD.bazel +++ b/packages/compiler/test/selector/BUILD.bazel @@ -17,11 +17,10 @@ ts_library( jasmine_node_test( name = "selector", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":selector_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/core/test/BUILD.bazel b/packages/core/test/BUILD.bazel index eed634e303..ed342c93de 100644 --- a/packages/core/test/BUILD.bazel +++ b/packages/core/test/BUILD.bazel @@ -59,8 +59,8 @@ ts_library( jasmine_node_test( name = "test", + bootstrap = ["//tools/testing:node_es5"], shard_count = 4, - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], deps = [ ":test_lib", ":test_node_only_lib", @@ -68,7 +68,6 @@ jasmine_node_test( "//packages/platform-server/testing", "//packages/zone.js/lib:zone_d_ts", "//tools/testing:node", - "//tools/testing:node_es5", "@npm//base64-js", "@npm//source-map", ], diff --git a/packages/core/test/acceptance/BUILD.bazel b/packages/core/test/acceptance/BUILD.bazel index 65bb7eeb21..2d3cebbe46 100644 --- a/packages/core/test/acceptance/BUILD.bazel +++ b/packages/core/test/acceptance/BUILD.bazel @@ -37,12 +37,11 @@ ts_library( jasmine_node_test( name = "acceptance", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":acceptance_lib", "//packages/zone.js/lib:zone_d_ts", "//tools/testing:node", - "//tools/testing:node_es5", "@npm//base64-js", "@npm//source-map", ], diff --git a/packages/core/test/render3/BUILD.bazel b/packages/core/test/render3/BUILD.bazel index fd33e052e1..26b42ba24e 100644 --- a/packages/core/test/render3/BUILD.bazel +++ b/packages/core/test/render3/BUILD.bazel @@ -61,10 +61,9 @@ ts_library( jasmine_node_test( name = "render3", - templated_args = ["--node_options=--require=$(rlocation $(location :domino_es5))"], + bootstrap = [":domino_es5"], deps = [ ":domino", - ":domino_es5", ":render3_node_lib", "//packages/zone.js/lib", ], diff --git a/packages/core/test/render3/ivy/BUILD.bazel b/packages/core/test/render3/ivy/BUILD.bazel index a35b6ae234..9df434c2f1 100644 --- a/packages/core/test/render3/ivy/BUILD.bazel +++ b/packages/core/test/render3/ivy/BUILD.bazel @@ -16,14 +16,13 @@ ts_library( jasmine_node_test( name = "ivy", + bootstrap = ["//packages/core/test/render3:domino_es5"], tags = [ "ivy-only", ], - templated_args = ["--node_options=--require=$(rlocation $(location //packages/core/test/render3:domino_es5))"], deps = [ ":ivy_lib", "//packages/core/test/render3:domino", - "//packages/core/test/render3:domino_es5", "//packages/zone.js/lib", ], ) diff --git a/packages/core/test/view/BUILD.bazel b/packages/core/test/view/BUILD.bazel index b1345c912c..7430f86310 100644 --- a/packages/core/test/view/BUILD.bazel +++ b/packages/core/test/view/BUILD.bazel @@ -34,15 +34,14 @@ ts_library( jasmine_node_test( name = "view", + bootstrap = ["//tools/testing:node_es5"], tags = [ "no-ivy-aot", ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], deps = [ ":view_lib", ":view_node_only_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/examples/core/BUILD.bazel b/packages/examples/core/BUILD.bazel index 98a46a423a..676348c884 100644 --- a/packages/examples/core/BUILD.bazel +++ b/packages/examples/core/BUILD.bazel @@ -78,10 +78,9 @@ protractor_web_test_suite( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":core_tests_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/examples/core/testing/ts/BUILD.bazel b/packages/examples/core/testing/ts/BUILD.bazel index c9076e5c54..29f080aa20 100644 --- a/packages/examples/core/testing/ts/BUILD.bazel +++ b/packages/examples/core/testing/ts/BUILD.bazel @@ -15,10 +15,9 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":fake_async_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/forms/test/BUILD.bazel b/packages/forms/test/BUILD.bazel index 3e71cc2ac8..46856c94d9 100644 --- a/packages/forms/test/BUILD.bazel +++ b/packages/forms/test/BUILD.bazel @@ -20,11 +20,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/http/test/BUILD.bazel b/packages/http/test/BUILD.bazel index ad9bbebbf3..1b9289ca12 100644 --- a/packages/http/test/BUILD.bazel +++ b/packages/http/test/BUILD.bazel @@ -20,11 +20,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/localize/schematics/ng-add/BUILD.bazel b/packages/localize/schematics/ng-add/BUILD.bazel index a2ca2bcd27..f8ea99bcca 100644 --- a/packages/localize/schematics/ng-add/BUILD.bazel +++ b/packages/localize/schematics/ng-add/BUILD.bazel @@ -43,10 +43,9 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/localize/src/localize/test/BUILD.bazel b/packages/localize/src/localize/test/BUILD.bazel index 1751925a5a..4da7c93501 100644 --- a/packages/localize/src/localize/test/BUILD.bazel +++ b/packages/localize/src/localize/test/BUILD.bazel @@ -14,9 +14,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/localize/src/tools/test/BUILD.bazel b/packages/localize/src/tools/test/BUILD.bazel index 294dbaca09..1e8056c7bd 100644 --- a/packages/localize/src/tools/test/BUILD.bazel +++ b/packages/localize/src/tools/test/BUILD.bazel @@ -22,10 +22,9 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", "@npm//glob", ], ) diff --git a/packages/localize/src/tools/test/translate/integration/BUILD.bazel b/packages/localize/src/tools/test/translate/integration/BUILD.bazel index c082ada410..d114c63fff 100644 --- a/packages/localize/src/tools/test/translate/integration/BUILD.bazel +++ b/packages/localize/src/tools/test/translate/integration/BUILD.bazel @@ -14,16 +14,15 @@ ts_library( jasmine_node_test( name = "integration", + bootstrap = ["//tools/testing:node_no_angular_es5"], data = glob( [ "locales/**", "test_files/**", ], ), - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", "@npm//glob", "@npm//yargs", ], diff --git a/packages/localize/src/utils/test/BUILD.bazel b/packages/localize/src/utils/test/BUILD.bazel index 8390849a2a..aa16ff7e83 100644 --- a/packages/localize/src/utils/test/BUILD.bazel +++ b/packages/localize/src/utils/test/BUILD.bazel @@ -14,9 +14,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/localize/test/BUILD.bazel b/packages/localize/test/BUILD.bazel index 8db773173c..6b1b5f437d 100644 --- a/packages/localize/test/BUILD.bazel +++ b/packages/localize/test/BUILD.bazel @@ -16,9 +16,8 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], + bootstrap = ["//tools/testing:node_no_angular_es5"], deps = [ ":test_lib", - "//tools/testing:node_no_angular_es5", ], ) diff --git a/packages/platform-browser-dynamic/test/BUILD.bazel b/packages/platform-browser-dynamic/test/BUILD.bazel index 5bfa0bcd0b..60b5585f22 100644 --- a/packages/platform-browser-dynamic/test/BUILD.bazel +++ b/packages/platform-browser-dynamic/test/BUILD.bazel @@ -18,11 +18,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/platform-browser/animations/test/BUILD.bazel b/packages/platform-browser/animations/test/BUILD.bazel index 8835133c33..9d1294b677 100644 --- a/packages/platform-browser/animations/test/BUILD.bazel +++ b/packages/platform-browser/animations/test/BUILD.bazel @@ -24,11 +24,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/platform-browser/test/BUILD.bazel b/packages/platform-browser/test/BUILD.bazel index 2c14cd335e..5be864c4d9 100644 --- a/packages/platform-browser/test/BUILD.bazel +++ b/packages/platform-browser/test/BUILD.bazel @@ -29,11 +29,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/platform-server/test/BUILD.bazel b/packages/platform-server/test/BUILD.bazel index bd371d35b9..74332f4c22 100644 --- a/packages/platform-server/test/BUILD.bazel +++ b/packages/platform-server/test/BUILD.bazel @@ -22,12 +22,11 @@ ts_library( jasmine_node_test( name = "test", + bootstrap = ["//tools/testing:node_es5"], tags = [ ], - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/platform-webworker/test/BUILD.bazel b/packages/platform-webworker/test/BUILD.bazel index c111faa7f1..9d0bf6d0a2 100644 --- a/packages/platform-webworker/test/BUILD.bazel +++ b/packages/platform-webworker/test/BUILD.bazel @@ -21,11 +21,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/router/test/BUILD.bazel b/packages/router/test/BUILD.bazel index d4bf152368..abdb280aa7 100644 --- a/packages/router/test/BUILD.bazel +++ b/packages/router/test/BUILD.bazel @@ -23,11 +23,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/router/test/aot_ngsummary_test/BUILD.bazel b/packages/router/test/aot_ngsummary_test/BUILD.bazel index 8ab47431b0..eddda99117 100644 --- a/packages/router/test/aot_ngsummary_test/BUILD.bazel +++ b/packages/router/test/aot_ngsummary_test/BUILD.bazel @@ -27,10 +27,9 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":aot_test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/service-worker/config/test/BUILD.bazel b/packages/service-worker/config/test/BUILD.bazel index 27c30ad4ff..42e7996c1d 100644 --- a/packages/service-worker/config/test/BUILD.bazel +++ b/packages/service-worker/config/test/BUILD.bazel @@ -14,12 +14,11 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//packages/service-worker/config", "//packages/service-worker/config/testing", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/service-worker/test/BUILD.bazel b/packages/service-worker/test/BUILD.bazel index 02ae61548c..3713e69aa9 100644 --- a/packages/service-worker/test/BUILD.bazel +++ b/packages/service-worker/test/BUILD.bazel @@ -18,11 +18,10 @@ ts_library( jasmine_node_test( name = "test", - templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], + bootstrap = ["//tools/testing:node_es5"], deps = [ ":test_lib", "//tools/testing:node", - "//tools/testing:node_es5", ], ) diff --git a/packages/zone.js/test/BUILD.bazel b/packages/zone.js/test/BUILD.bazel index ac4561a830..50ae11d47a 100644 --- a/packages/zone.js/test/BUILD.bazel +++ b/packages/zone.js/test/BUILD.bazel @@ -181,46 +181,41 @@ ts_library( jasmine_node_test( name = "test_node", - templated_args = ["--node_options=--require=$(rlocation $(location :node_entry_point_es5))"], + bootstrap = [":node_entry_point_es5"], deps = [ - ":node_entry_point_es5", ":test_node_lib", ], ) jasmine_node_test( name = "test_node_no_jasmine_clock", - templated_args = ["--node_options=--require=$(rlocation $(location :node_entry_point_no_patch_clock_es5))"], + bootstrap = [":node_entry_point_no_patch_clock_es5"], deps = [ - ":node_entry_point_no_patch_clock_es5", ":test_node_lib", ], ) jasmine_node_test( name = "test_node_bluebird", - templated_args = ["--node_options=--require=$(rlocation $(location :node_bluebird_entry_point_es5))"], + bootstrap = [":node_bluebird_entry_point_es5"], deps = [ ":bluebird_spec", - ":node_bluebird_entry_point_es5", ], ) jasmine_node_test( name = "test_node_error_disable_policy", - templated_args = ["--node_options=--require=$(rlocation $(location :node_error_disable_policy_entry_point_es5))"], + bootstrap = [":node_error_disable_policy_entry_point_es5"], deps = [ ":node_error_disable_policy_entry_point", - ":node_error_disable_policy_entry_point_es5", ], ) jasmine_node_test( name = "test_node_error_lazy_policy", - templated_args = ["--node_options=--require=$(rlocation $(location :node_error_lazy_policy_entry_point_es5))"], + bootstrap = [":node_error_lazy_policy_entry_point_es5"], deps = [ ":node_error_lazy_policy_entry_point", - ":node_error_lazy_policy_entry_point_es5", ], ) diff --git a/tools/defaults.bzl b/tools/defaults.bzl index aec19d7cf6..56618df1be 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -256,10 +256,11 @@ def nodejs_binary(data = [], **kwargs): **kwargs ) -def jasmine_node_test(deps = [], **kwargs): +def jasmine_node_test(bootstrap = [], **kwargs): """Default values for jasmine_node_test""" - deps = deps + [ - # Very common dependencies for tests + + # Very common dependencies for tests + deps = kwargs.pop("deps", []) + [ "@npm//chokidar", "@npm//domino", "@npm//jasmine-core", @@ -268,9 +269,18 @@ def jasmine_node_test(deps = [], **kwargs): "@npm//tslib", "@npm//xhr2", ] + configuration_env_vars = kwargs.pop("configuration_env_vars", []) + [ + "angular_ivy_enabled", + ] + templated_args = kwargs.pop("templated_args", []) + for label in bootstrap: + deps += [label] + templated_args += ["--node_options=--require=$(rlocation $(location %s))" % label] + _jasmine_node_test( deps = deps, - configuration_env_vars = ["angular_ivy_enabled"], + configuration_env_vars = configuration_env_vars, + templated_args = templated_args, **kwargs )