build(bazel): update to rules_typescript 0.17.0 & rules_nodejs 0.13.4 (#25920)

PR Close #25920
This commit is contained in:
Greg Magolan
2018-09-11 18:11:32 -07:00
committed by Alex Eagle
parent a77f567403
commit 2c987625ae
4 changed files with 177 additions and 234 deletions

View File

@ -6,35 +6,35 @@
"""This test verifies that a set of top level symbols from a javascript file match a gold file.
"""
# This does a deep import under //internal because of not wanting the wrapper macro
# This does a deep import under //internal because of not wanting the wrapper macro
# because it introduces an extra target_bin target.
load("@build_bazel_rules_nodejs//internal/node:node.bzl", "nodejs_test", "nodejs_binary")
DEFAULT_NODE_MODULES = "@angular_deps//:node_modules"
def js_expected_symbol_test(name, src, golden, node_modules = DEFAULT_NODE_MODULES, **kwargs):
"""This test verifies that a set of top level symbols from a javascript file match a gold file.
"""
all_data = [src, golden]
all_data += [Label("//tools/symbol-extractor:lib")]
all_data += [Label("@bazel_tools//tools/bash/runfiles")]
entry_point = "angular/tools/symbol-extractor/cli.js"
"""This test verifies that a set of top level symbols from a javascript file match a gold file.
"""
all_data = [src, golden]
all_data += [Label("//tools/symbol-extractor:lib")]
all_data += [Label("@bazel_tools//tools/bash/runfiles")]
entry_point = "angular/tools/symbol-extractor/cli.js"
nodejs_test(
name = name,
data = all_data,
entry_point = entry_point,
templated_args = ["$(location %s)" % src, "$(location %s)" % golden],
node_modules = node_modules,
**kwargs
)
nodejs_test(
name = name,
data = all_data,
entry_point = entry_point,
templated_args = ["$(location %s)" % src, "$(location %s)" % golden],
node_modules = node_modules,
**kwargs
)
nodejs_binary(
name = name + '.accept',
testonly = True,
data = all_data,
entry_point = entry_point,
templated_args = ["$(location %s)" % src, "$(location %s)" % golden, '--accept'],
node_modules = node_modules,
**kwargs
)
nodejs_binary(
name = name + ".accept",
testonly = True,
data = all_data,
entry_point = entry_point,
templated_args = ["$(location %s)" % src, "$(location %s)" % golden, "--accept"],
node_modules = node_modules,
**kwargs
)