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:
parent
ddc13352e9
commit
2a21ca09d2
|
@ -17,9 +17,9 @@
|
||||||
|
|
||||||
load("@build_bazel_rules_nodejs//internal/node:node.bzl", "nodejs_binary", "nodejs_test")
|
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
|
"""Runs ts_api_guardian
|
||||||
"""
|
"""
|
||||||
data += [
|
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.
|
# From there, the relative imports would point to .ts files.
|
||||||
"--node_options=--preserve-symlinks",
|
"--node_options=--preserve-symlinks",
|
||||||
"--stripExportPattern",
|
"--stripExportPattern",
|
||||||
"^\(__\|ɵ\)",
|
strip_export_pattern,
|
||||||
]
|
]
|
||||||
for i in COMMON_MODULE_IDENTIFIERS:
|
for i in allow_module_identifiers:
|
||||||
args += ["--allowModuleIdentifiers", i]
|
args += ["--allowModuleIdentifiers", i]
|
||||||
|
|
||||||
nodejs_test(
|
nodejs_test(
|
||||||
|
|
Loading…
Reference in New Issue