This reverts commit 753b5bc3055590b89d66f6dff1f89ab1221dc773. PR Close #34730
This commit is contained in:
parent
2f810b2c1f
commit
88c7dfefe6
@ -257,30 +257,7 @@ def nodejs_binary(data = [], **kwargs):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def jasmine_node_test(bootstrap = [], **kwargs):
|
def jasmine_node_test(bootstrap = [], **kwargs):
|
||||||
"""Default values for jasmine_node_test
|
"""Default values for jasmine_node_test"""
|
||||||
|
|
||||||
Args:
|
|
||||||
bootstrap: A list of labels of scripts to run before the entry_point.
|
|
||||||
|
|
||||||
The labels can either be individual files or a filegroup that contain a single
|
|
||||||
file.
|
|
||||||
|
|
||||||
The label is automatically added to the deps of jasmine_node_test.
|
|
||||||
If the label ends in `_es5` which by convention selects the es5 outputs
|
|
||||||
of a ts_library rule, then corresponding ts_library target sans `_es5`
|
|
||||||
is also added to the deps of jasmine_node_test.
|
|
||||||
|
|
||||||
For example with,
|
|
||||||
|
|
||||||
jasmine_node_test(
|
|
||||||
name = "test",
|
|
||||||
bootstrap = ["//tools/testing:node_es5"],
|
|
||||||
deps = [":test_lib"],
|
|
||||||
)
|
|
||||||
|
|
||||||
the `//tools/testing:node` target will automatically get added to deps
|
|
||||||
by this macro. This removes the need for duplicate deps on the
|
|
||||||
target and makes the usage of this rule less verbose."""
|
|
||||||
|
|
||||||
# Very common dependencies for tests
|
# Very common dependencies for tests
|
||||||
deps = kwargs.pop("deps", []) + [
|
deps = kwargs.pop("deps", []) + [
|
||||||
@ -305,10 +282,9 @@ def jasmine_node_test(bootstrap = [], **kwargs):
|
|||||||
deps += [label]
|
deps += [label]
|
||||||
templated_args += ["--node_options=--require=$(rlocation $(location %s))" % label]
|
templated_args += ["--node_options=--require=$(rlocation $(location %s))" % label]
|
||||||
if label.endswith("_es5"):
|
if label.endswith("_es5"):
|
||||||
# If this label is a filegroup derived from a ts_library then automatically
|
# If this label is a filegroup derived from a ts_library then automtically
|
||||||
# add the ts_library target (which is the label sans `_es5`) to deps so we pull
|
# add the ts_library target (which is the label sans `_es5`) to deps so we pull
|
||||||
# in all of its transitive deps. This removes the need for duplicate deps on the
|
# in all of its transitive deps
|
||||||
# target and makes the usage of this rule less verbose.
|
|
||||||
deps += [label[:-4]]
|
deps += [label[:-4]]
|
||||||
|
|
||||||
_jasmine_node_test(
|
_jasmine_node_test(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user