feat(bazel): add additional parameters to `ts_api_guardian_test` def (#25694)

Added `strip_export_pattern` and `allow_module_identifiers` so that these can be passed from downstream

PR Close #25694
This commit is contained in:
Alan Agius 2018-09-07 17:31:45 +02:00 committed by Igor Minar
parent ddc13352e9
commit 2a21ca09d2
1 changed files with 4 additions and 4 deletions

View File

@ -17,9 +17,9 @@
load("@build_bazel_rules_nodejs//internal/node:node.bzl", "nodejs_binary", "nodejs_test")
COMMON_MODULE_IDENTIFIERS = ["angular", "jasmine", "protractor", "fs", "Symbol"]
COMMON_MODULE_IDENTIFIERS = ["angular", "jasmine", "protractor"]
def ts_api_guardian_test(name, golden, actual, data = [], **kwargs):
def ts_api_guardian_test(name, golden, actual, data = [], strip_export_pattern = "^\(__\\)", allow_module_identifiers = COMMON_MODULE_IDENTIFIERS, **kwargs):
"""Runs ts_api_guardian
"""
data += [
@ -33,9 +33,9 @@ def ts_api_guardian_test(name, golden, actual, data = [], **kwargs):
# From there, the relative imports would point to .ts files.
"--node_options=--preserve-symlinks",
"--stripExportPattern",
"^\(__\\)",
strip_export_pattern,
]
for i in COMMON_MODULE_IDENTIFIERS:
for i in allow_module_identifiers:
args += ["--allowModuleIdentifiers", i]
nodejs_test(