Revert "refactor: handle breaking changes in rules_nodejs 1.0.0 (#34589)" (#34730)

This reverts commit 9bb349e1c8.

PR Close #34730
This commit is contained in:
atscott 2020-01-10 13:40:02 -08:00
parent 7e9ac7650b
commit 538d0446b5
69 changed files with 131 additions and 318 deletions

View File

@ -16,11 +16,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -13,11 +13,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -12,12 +12,11 @@ filegroup(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
"//packages/bazel/src/schematics/ng-add:test", "//packages/bazel/src/schematics/ng-add:test",
"//packages/bazel/src/schematics/ng-new:test", "//packages/bazel/src/schematics/ng-new:test",
"//packages/bazel/src/schematics/utility:test", "//packages/bazel/src/schematics/utility:test",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -15,13 +15,12 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/benchpress", "//packages/benchpress",
"//packages/core/testing", "//packages/core/testing",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
"@npm//protractor", "@npm//protractor",
], ],
) )

View File

@ -19,11 +19,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -17,11 +17,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -24,11 +24,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -16,10 +16,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -21,13 +21,12 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/platform-server", "//packages/platform-server",
"//packages/platform-server/testing", "//packages/platform-server/testing",
"//packages/private/testing", "//packages/private/testing",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -22,13 +22,12 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular/tools/testing/init_node_spec.js"],
tags = [ tags = [
"ivy-only", "ivy-only",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -33,13 +33,13 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
data = [ data = [
"//packages/compiler-cli/test/ngtsc/fake_core:npm_package", "//packages/compiler-cli/test/ngtsc/fake_core:npm_package",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )
@ -64,6 +64,7 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "integration", name = "integration",
timeout = "long", timeout = "long",
bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
data = [ data = [
"//packages/common:npm_package", "//packages/common:npm_package",
"//packages/core:npm_package", "//packages/core:npm_package",
@ -74,10 +75,9 @@ jasmine_node_test(
# Disabled in AOT mode because we want ngcc to compile non-AOT Angular packages. # Disabled in AOT mode because we want ngcc to compile non-AOT Angular packages.
"no-ivy-aot", "no-ivy-aot",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"],
deps = [ deps = [
":integration_lib", ":integration_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
"@npm//canonical-path", "@npm//canonical-path",
"@npm//convert-source-map", "@npm//convert-source-map",
], ],

View File

@ -29,9 +29,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -21,9 +21,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -19,9 +19,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -18,9 +18,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -22,9 +22,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -23,9 +23,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -24,9 +24,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -20,9 +20,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -24,9 +24,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -17,9 +17,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -24,9 +24,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -20,9 +20,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -40,6 +40,7 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "extract_i18n", name = "extract_i18n",
bootstrap = ["angular/tools/testing/init_node_spec.js"],
data = [ data = [
"//packages/core:npm_package", "//packages/core:npm_package",
], ],
@ -48,13 +49,11 @@ jasmine_node_test(
# tool will likely work differently. # tool will likely work differently.
"no-ivy-aot", "no-ivy-aot",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":extract_i18n_lib", ":extract_i18n_lib",
"//packages/common:npm_package", "//packages/common:npm_package",
"//packages/core", "//packages/core",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
"@npm//minimist", "@npm//minimist",
], ],
) )
@ -77,6 +76,7 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "ngc", name = "ngc",
timeout = "long", # 900 seconds timeout = "long", # 900 seconds
bootstrap = ["angular/tools/testing/init_node_spec.js"],
data = [ data = [
"//packages/common:npm_package", "//packages/common:npm_package",
"//packages/core:npm_package", "//packages/core:npm_package",
@ -88,12 +88,10 @@ jasmine_node_test(
# own tests under //packages/compiler-cli/test/ngtsc. # own tests under //packages/compiler-cli/test/ngtsc.
"no-ivy-aot", "no-ivy-aot",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":ngc_lib", ":ngc_lib",
"//packages/core", "//packages/core",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
"@npm//minimist", "@npm//minimist",
"@npm//rxjs", "@npm//rxjs",
"@npm//tsickle", "@npm//tsickle",
@ -118,15 +116,14 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "perform_watch", name = "perform_watch",
bootstrap = ["angular/tools/testing/init_node_spec.js"],
data = [ data = [
"//packages/core:npm_package", "//packages/core:npm_package",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":perform_watch_lib", ":perform_watch_lib",
"//packages/core", "//packages/core",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )
@ -146,14 +143,13 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "perform_compile", name = "perform_compile",
bootstrap = ["angular/tools/testing/init_node_spec.js"],
data = [ data = [
"//packages/core:npm_package", "//packages/core:npm_package",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":perform_compile_lib", ":perform_compile_lib",
"//packages/core", "//packages/core",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -18,6 +18,7 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "compliance", name = "compliance",
bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
data = [ data = [
"//packages/compiler-cli/test/ngtsc/fake_core:npm_package", "//packages/compiler-cli/test/ngtsc/fake_core:npm_package",
], ],
@ -25,9 +26,8 @@ jasmine_node_test(
tags = [ tags = [
"ivy-only", "ivy-only",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -15,6 +15,7 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "check_types", name = "check_types",
timeout = "long", # 900 seconds timeout = "long", # 900 seconds
bootstrap = ["angular/tools/testing/init_node_spec.js"],
data = [ data = [
"//packages/common:npm_package", "//packages/common:npm_package",
"//packages/core:npm_package", "//packages/core:npm_package",
@ -24,12 +25,10 @@ jasmine_node_test(
# compiler has its own typechecking implementation and tests. # compiler has its own typechecking implementation and tests.
"no-ivy-aot", "no-ivy-aot",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":check_types_lib", ":check_types_lib",
"//packages/core", "//packages/core",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )
@ -46,10 +45,11 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "typescript_version", name = "typescript_version",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
data = [
],
deps = [ deps = [
":typescript_version_lib", ":typescript_version_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -16,13 +16,12 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular/tools/testing/init_node_spec.js"],
data = [ data = [
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/core", "//packages/core",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -23,14 +23,14 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "ngtsc", name = "ngtsc",
timeout = "long", timeout = "long",
bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"],
data = [ data = [
"//packages/compiler-cli/test/ngtsc/fake_core:npm_package", "//packages/compiler-cli/test/ngtsc/fake_core:npm_package",
], ],
shard_count = 4, shard_count = 4,
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"],
deps = [ deps = [
":ngtsc_lib", ":ngtsc_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
"@npm//minimist", "@npm//minimist",
], ],
) )

View File

@ -19,6 +19,7 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
timeout = "long", # 900 seconds timeout = "long", # 900 seconds
bootstrap = ["angular/tools/testing/init_node_spec.js"],
data = [ data = [
"//packages/common:npm_package", "//packages/common:npm_package",
"//packages/core:npm_package", "//packages/core:npm_package",
@ -29,12 +30,10 @@ jasmine_node_test(
# of these transformer utilities. # of these transformer utilities.
"no-ivy-aot", "no-ivy-aot",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/core", "//packages/core",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
"@npm//source-map", "@npm//source-map",
], ],
) )

View File

@ -70,6 +70,7 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular/tools/testing/init_node_spec.js"],
data = [ data = [
"//packages/animations:npm_package", "//packages/animations:npm_package",
"//packages/common: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. # Disabled as these tests pertain to the old ngc compilation and are not relevant in Ivy.
"no-ivy-aot", "no-ivy-aot",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":test_lib", ":test_lib",
":test_node_only_lib", ":test_node_only_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
"@npm//base64-js", "@npm//base64-js",
"@npm//source-map", "@npm//source-map",
], ],

View File

@ -16,11 +16,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "css_parser", name = "css_parser",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":css_parser_lib", ":css_parser_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -15,11 +15,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "expression_parser", name = "expression_parser",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":expression_parser_lib", ":expression_parser_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -13,11 +13,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "ml_parser", name = "ml_parser",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":ml_parser_lib", ":ml_parser_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -18,10 +18,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -17,11 +17,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "selector", name = "selector",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":selector_lib", ":selector_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -59,8 +59,8 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular/tools/testing/init_node_spec.js"],
shard_count = 4, shard_count = 4,
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":test_lib", ":test_lib",
":test_node_only_lib", ":test_node_only_lib",
@ -68,7 +68,6 @@ jasmine_node_test(
"//packages/platform-server/testing", "//packages/platform-server/testing",
"//packages/zone.js/lib:zone_d_ts", "//packages/zone.js/lib:zone_d_ts",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
"@npm//base64-js", "@npm//base64-js",
"@npm//source-map", "@npm//source-map",
], ],

View File

@ -37,12 +37,11 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "acceptance", name = "acceptance",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":acceptance_lib", ":acceptance_lib",
"//packages/zone.js/lib:zone_d_ts", "//packages/zone.js/lib:zone_d_ts",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
"@npm//base64-js", "@npm//base64-js",
"@npm//source-map", "@npm//source-map",
], ],

View File

@ -61,10 +61,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "render3", name = "render3",
templated_args = ["--node_options=--require=$(rlocation $(location :domino_es5))"], bootstrap = [
"angular/packages/core/test/render3/load_domino",
],
deps = [ deps = [
":domino",
":domino_es5",
":render3_node_lib", ":render3_node_lib",
"//packages/zone.js/lib", "//packages/zone.js/lib",
], ],

View File

@ -16,14 +16,15 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "ivy", name = "ivy",
bootstrap = [
"angular/packages/core/test/render3/load_domino",
],
tags = [ tags = [
"ivy-only", "ivy-only",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //packages/core/test/render3:domino_es5))"],
deps = [ deps = [
":ivy_lib", ":ivy_lib",
"//packages/core/test/render3:domino", "//packages/core/test/render3:domino",
"//packages/core/test/render3:domino_es5",
"//packages/zone.js/lib", "//packages/zone.js/lib",
], ],
) )

View File

@ -6,15 +6,6 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
if (process.env['TEST_SRCDIR']) {
// bootstrap the bazel require resolve patch since this
// script is a bootstrap script loaded with --node_options=--require=...
const path = require('path');
require(path.posix.join(
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
}
// Needed to run animation tests // Needed to run animation tests
import 'zone.js/lib/node/rollup-main'; import 'zone.js/lib/node/rollup-main';
import '@angular/compiler'; // For JIT mode. Must be in front of any other @angular/* imports. import '@angular/compiler'; // For JIT mode. Must be in front of any other @angular/* imports.

View File

@ -34,15 +34,14 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "view", name = "view",
bootstrap = ["angular/tools/testing/init_node_spec.js"],
tags = [ tags = [
"no-ivy-aot", "no-ivy-aot",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":view_lib", ":view_lib",
":view_node_only_lib", ":view_node_only_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -78,10 +78,9 @@ protractor_web_test_suite(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":core_tests_lib", ":core_tests_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -15,10 +15,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":fake_async_lib", ":fake_async_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -20,11 +20,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -20,11 +20,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -43,10 +43,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -14,9 +14,11 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = [
"angular/tools/testing/init_node_no_angular_spec.js",
],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -22,10 +22,12 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = [
"angular/tools/testing/init_node_no_angular_spec.js",
],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
"@npm//glob", "@npm//glob",
], ],
) )

View File

@ -14,16 +14,18 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "integration", name = "integration",
bootstrap = [
"angular/tools/testing/init_node_no_angular_spec.js",
],
data = glob( data = glob(
[ [
"locales/**", "locales/**",
"test_files/**", "test_files/**",
], ],
), ),
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
"@npm//glob", "@npm//glob",
"@npm//yargs", "@npm//yargs",
], ],

View File

@ -14,9 +14,11 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = [
"angular/tools/testing/init_node_no_angular_spec.js",
],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -16,9 +16,11 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_no_angular_es5))"], bootstrap = [
"angular/tools/testing/init_node_no_angular_spec.js",
],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node_no_angular_es5", "//tools/testing:node_no_angular",
], ],
) )

View File

@ -18,11 +18,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -24,11 +24,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -29,11 +29,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -22,12 +22,11 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular/tools/testing/init_node_spec.js"],
tags = [ tags = [
], ],
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -21,11 +21,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -23,11 +23,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -27,10 +27,9 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":aot_test_lib", ":aot_test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -14,12 +14,11 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/service-worker/config", "//packages/service-worker/config",
"//packages/service-worker/config/testing", "//packages/service-worker/config/testing",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -18,11 +18,10 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
"//tools/testing:node_es5",
], ],
) )

View File

@ -68,6 +68,8 @@ ts_library(
testonly = True, testonly = True,
srcs = glob(["node/*.ts"]) + [ srcs = glob(["node/*.ts"]) + [
"node-env-setup.ts", "node-env-setup.ts",
"node_entry_point.ts",
"node_entry_point_no_patch_clock.ts",
"test-env-setup-jasmine-no-patch-clock.ts", "test-env-setup-jasmine-no-patch-clock.ts",
], ],
deps = [ deps = [
@ -83,45 +85,12 @@ ts_library(
], ],
) )
ts_library(
name = "node_entry_point",
testonly = True,
srcs = ["node_entry_point.ts"],
deps = [
":common_spec_env",
":common_spec_srcs",
":common_spec_util",
"//packages/zone.js/lib",
"@npm//@types/shelljs",
"@npm//@types/systemjs",
"@npm//rxjs",
"@npm//shelljs",
"@npm//systemjs",
],
)
ts_library(
name = "node_entry_point_no_patch_clock",
testonly = True,
srcs = ["node_entry_point_no_patch_clock.ts"],
deps = [
":common_spec_env",
":common_spec_srcs",
":common_spec_util",
"//packages/zone.js/lib",
"@npm//@types/shelljs",
"@npm//@types/systemjs",
"@npm//rxjs",
"@npm//shelljs",
"@npm//systemjs",
],
)
ts_library( ts_library(
name = "bluebird_spec", name = "bluebird_spec",
testonly = True, testonly = True,
srcs = [ srcs = [
"extra/bluebird.spec.ts", "extra/bluebird.spec.ts",
"node_bluebird_entry_point.ts",
], ],
deps = [ deps = [
":common_spec_env", ":common_spec_env",
@ -131,96 +100,68 @@ ts_library(
) )
ts_library( ts_library(
name = "node_bluebird_entry_point", name = "error_spec",
testonly = True, testonly = True,
srcs = ["node_bluebird_entry_point.ts"], srcs = [
deps = [ "node_error_disable_policy_entry_point.ts",
":common_spec_env", "node_error_entry_point.ts",
"//packages/zone.js/lib", "node_error_lazy_policy_entry_point.ts",
"@npm//bluebird",
], ],
)
ts_library(
name = "node_error_disable_policy_entry_point",
testonly = True,
srcs = ["node_error_disable_policy_entry_point.ts"],
deps = [ deps = [
":common_spec_env", ":common_spec_env",
":common_spec_util", ":common_spec_util",
":error_spec_srcs", ":error_spec_srcs",
":node_error_entry_point",
"//packages/zone.js/lib",
],
)
ts_library(
name = "node_error_entry_point",
testonly = True,
srcs = ["node_error_entry_point.ts"],
deps = [
":common_spec_env",
":common_spec_util",
":error_spec_srcs",
"//packages/zone.js/lib",
],
)
ts_library(
name = "node_error_lazy_policy_entry_point",
testonly = True,
srcs = ["node_error_lazy_policy_entry_point.ts"],
deps = [
":common_spec_env",
":common_spec_util",
":error_spec_srcs",
":node_error_entry_point",
"//packages/zone.js/lib", "//packages/zone.js/lib",
], ],
) )
jasmine_node_test( jasmine_node_test(
name = "test_node", name = "test_node",
templated_args = ["--node_options=--require=$(rlocation $(location :node_entry_point_es5))"], bootstrap = [
"angular/packages/zone.js/test/node_entry_point.js",
],
deps = [ deps = [
":node_entry_point_es5",
":test_node_lib", ":test_node_lib",
], ],
) )
jasmine_node_test( jasmine_node_test(
name = "test_node_no_jasmine_clock", name = "test_node_no_jasmine_clock",
templated_args = ["--node_options=--require=$(rlocation $(location :node_entry_point_no_patch_clock_es5))"], bootstrap = [
"angular/packages/zone.js/test/node_entry_point_no_patch_clock.js",
],
deps = [ deps = [
":node_entry_point_no_patch_clock_es5",
":test_node_lib", ":test_node_lib",
], ],
) )
jasmine_node_test( jasmine_node_test(
name = "test_node_bluebird", name = "test_node_bluebird",
templated_args = ["--node_options=--require=$(rlocation $(location :node_bluebird_entry_point_es5))"], bootstrap = [
"angular/packages/zone.js/test/node_bluebird_entry_point.js",
],
deps = [ deps = [
":bluebird_spec", ":bluebird_spec",
":node_bluebird_entry_point_es5",
], ],
) )
jasmine_node_test( jasmine_node_test(
name = "test_node_error_disable_policy", name = "test_node_error_disable_policy",
templated_args = ["--node_options=--require=$(rlocation $(location :node_error_disable_policy_entry_point_es5))"], bootstrap = [
"angular/packages/zone.js/test/node_error_disable_policy_entry_point.js",
],
deps = [ deps = [
":node_error_disable_policy_entry_point", ":error_spec",
":node_error_disable_policy_entry_point_es5",
], ],
) )
jasmine_node_test( jasmine_node_test(
name = "test_node_error_lazy_policy", name = "test_node_error_lazy_policy",
templated_args = ["--node_options=--require=$(rlocation $(location :node_error_lazy_policy_entry_point_es5))"], bootstrap = [
"angular/packages/zone.js/test/node_error_lazy_policy_entry_point.js",
],
deps = [ deps = [
":node_error_lazy_policy_entry_point", ":error_spec",
":node_error_lazy_policy_entry_point_es5",
], ],
) )

View File

@ -6,15 +6,6 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
if (process.env['TEST_SRCDIR']) {
// bootstrap the bazel require resolve patch since this
// script is a bootstrap script loaded with --node_options=--require=...
const path = require('path');
require(path.posix.join(
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
}
// Must be loaded before zone loads, so that zone can detect WTF. // Must be loaded before zone loads, so that zone can detect WTF.
import './test_fake_polyfill'; import './test_fake_polyfill';

View File

@ -13,15 +13,6 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
if (process.env['TEST_SRCDIR']) {
// bootstrap the bazel require resolve patch since this
// script is a bootstrap script loaded with --node_options=--require=...
const path = require('path');
require(path.posix.join(
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
}
// Must be loaded before zone loads, so that zone can detect WTF. // Must be loaded before zone loads, so that zone can detect WTF.
import './node-env-setup'; import './node-env-setup';
import './test_fake_polyfill'; import './test_fake_polyfill';

View File

@ -13,15 +13,6 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
if (process.env['TEST_SRCDIR']) {
// bootstrap the bazel require resolve patch since this
// script is a bootstrap script loaded with --node_options=--require=...
const path = require('path');
require(path.posix.join(
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
}
// Must be loaded before zone loads, so that zone can detect WTF. // Must be loaded before zone loads, so that zone can detect WTF.
import './node-env-setup'; import './node-env-setup';
import './test_fake_polyfill'; import './test_fake_polyfill';

View File

@ -6,15 +6,6 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
if (process.env['TEST_SRCDIR']) {
// bootstrap the bazel require resolve patch since this
// script is a bootstrap script loaded with --node_options=--require=...
const path = require('path');
require(path.posix.join(
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
}
process.env['errorpolicy'] = (global as any)['__Zone_Error_BlacklistedStackFrames_policy'] = process.env['errorpolicy'] = (global as any)['__Zone_Error_BlacklistedStackFrames_policy'] =
'disable'; 'disable';
import './node_error_entry_point'; import './node_error_entry_point';

View File

@ -6,14 +6,5 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
if (process.env['TEST_SRCDIR']) {
// bootstrap the bazel require resolve patch since this
// script is a bootstrap script loaded with --node_options=--require=...
const path = require('path');
require(path.posix.join(
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
}
process.env['errorpolicy'] = (global as any)['__Zone_Error_BlacklistedStackFrames_policy'] = 'lazy'; process.env['errorpolicy'] = (global as any)['__Zone_Error_BlacklistedStackFrames_policy'] = 'lazy';
import './node_error_entry_point'; import './node_error_entry_point';

View File

@ -1,6 +1,6 @@
"""Re-export of some bazel rules with repository-wide defaults.""" """Re-export of some bazel rules with repository-wide defaults."""
load("@build_bazel_rules_nodejs//:index.bzl", _nodejs_binary = "nodejs_binary", _pkg_npm = "pkg_npm") load("@build_bazel_rules_nodejs//:index.bzl", _nodejs_binary = "nodejs_binary", _npm_package = "npm_package")
load("@npm_bazel_jasmine//:index.bzl", _jasmine_node_test = "jasmine_node_test") load("@npm_bazel_jasmine//:index.bzl", _jasmine_node_test = "jasmine_node_test")
load("@npm_bazel_karma//:index.bzl", _karma_web_test = "karma_web_test", _karma_web_test_suite = "karma_web_test_suite") load("@npm_bazel_karma//:index.bzl", _karma_web_test = "karma_web_test", _karma_web_test_suite = "karma_web_test_suite")
load("@npm_bazel_typescript//:index.bzl", _ts_devserver = "ts_devserver", _ts_library = "ts_library") load("@npm_bazel_typescript//:index.bzl", _ts_devserver = "ts_devserver", _ts_library = "ts_library")
@ -93,7 +93,7 @@ def ts_devserver(**kwargs):
**kwargs **kwargs
) )
def ts_library(name, tsconfig = None, testonly = False, deps = [], module_name = None, **kwargs): def ts_library(tsconfig = None, testonly = False, deps = [], module_name = None, **kwargs):
"""Default values for ts_library""" """Default values for ts_library"""
deps = deps + ["@npm//tslib"] deps = deps + ["@npm//tslib"]
if testonly: if testonly:
@ -108,7 +108,6 @@ def ts_library(name, tsconfig = None, testonly = False, deps = [], module_name =
module_name = _default_module_name(testonly) module_name = _default_module_name(testonly)
_ts_library( _ts_library(
name = name,
tsconfig = tsconfig, tsconfig = tsconfig,
testonly = testonly, testonly = testonly,
deps = deps, deps = deps,
@ -116,17 +115,6 @@ def ts_library(name, tsconfig = None, testonly = False, deps = [], module_name =
**kwargs **kwargs
) )
# Select the es5 .js output of the ts_library for use in downstream boostrap targets
# with `output_group = "es5_sources"`. This exposes an internal detail of ts_library
# that is not ideal.
# TODO(gregmagolan): clean this up by using tsc() in these cases rather than ts_library
native.filegroup(
name = "%s_es5" % name,
srcs = [":%s" % name],
testonly = testonly,
output_group = "es5_sources",
)
def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps = [], module_name = None, bundle_dts = True, **kwargs): def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps = [], module_name = None, bundle_dts = True, **kwargs):
"""Default values for ng_module""" """Default values for ng_module"""
deps = deps + ["@npm//tslib"] deps = deps + ["@npm//tslib"]

View File

@ -6,15 +6,6 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
if (process.env['TEST_SRCDIR']) {
// bootstrap the bazel require resolve patch since this
// script is a bootstrap script loaded with --node_options=--require=...
const path = require('path');
require(path.posix.join(
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
}
import 'zone.js/lib/node/rollup-main'; import 'zone.js/lib/node/rollup-main';
import 'zone.js/lib/zone-spec/long-stack-trace'; import 'zone.js/lib/zone-spec/long-stack-trace';
import 'zone.js/lib/zone-spec/task-tracking'; import 'zone.js/lib/zone-spec/task-tracking';

View File

@ -55,10 +55,7 @@ pkg_npm(
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = True, testonly = True,
srcs = glob( srcs = glob(["test/*.ts"]),
["test/*.ts"],
exclude = ["test/bootstrap.ts"],
),
tsconfig = "//tools:tsconfig-test", tsconfig = "//tools:tsconfig-test",
deps = [ deps = [
":lib", ":lib",
@ -71,40 +68,18 @@ ts_library(
], ],
) )
ts_library(
name = "bootstrap",
testonly = True,
srcs = ["test/bootstrap.ts"],
tsconfig = "//tools:tsconfig-test",
deps = ["@npm//@types/node"],
)
# Select the es5 .js output of the ts_library :boostrap target
# with `output_group = "es5_sources"` for use in the jasmine_node_test
# below. This exposes an internal detail of ts_library that is not ideal.
# TODO(gregmagolan): clean this up by using tsc() in this case rather than ts_library
filegroup(
name = "bootstrap_es5",
testonly = True,
srcs = [":bootstrap"],
output_group = "es5_sources",
)
jasmine_node_test( jasmine_node_test(
name = "tests", name = "tests",
srcs = [ srcs = [":test_lib"],
":test_lib", bootstrap = ["angular/tools/ts-api-guardian/test/bootstrap.js"],
],
data = glob([ data = glob([
"test/fixtures/*.ts", "test/fixtures/*.ts",
"test/fixtures/*.patch", "test/fixtures/*.patch",
]) + [ ]) + [
":bootstrap_es5",
":ts-api-guardian", ":ts-api-guardian",
# TODO: remove this once the boostrap.js workaround has been removed. # TODO: remove this once the boostrap.js workaround has been removed.
":package.json", ":package.json",
], ],
templated_args = ["--node_options=--require=$(rlocation $(location :bootstrap_es5))"],
) )
# END-INTERNAL # END-INTERNAL