Permalink
Browse files

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
  • Loading branch information...
alan-agius4 authored and IgorMinar committed Sep 7, 2018
1 parent ddc1335 commit 2a21ca09d2a6d36275c5969e46551662252d9e35
Showing with 4 additions and 4 deletions.
  1. +4 −4 tools/ts-api-guardian/index.bzl
@@ -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(

0 comments on commit 2a21ca0

Please sign in to comment.