Skip to content

Commit

Permalink
jasmine_node_test macro: pass templated_args through to nodejs_test.
Browse files Browse the repository at this point in the history
without this, a jasmine_node_test target specifying templated_args
will be broken, since the macro unconditionally passes its own
templated_args. (duplicated keywords in a rule is an error in the
loading phase.)
  • Loading branch information
Ubehebe authored and alexeagle committed Jun 4, 2019
1 parent 8f8558c commit 01a49a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/jasmine_node_test/jasmine_node_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ def jasmine_node_test(
all_data += [Label("//internal/jasmine_node_test:jasmine_runner.js")]
all_data += [":%s_devmode_srcs.MF" % name]
entry_point = "build_bazel_rules_nodejs/internal/jasmine_node_test/jasmine_runner.js"
# If the target specified templated_args, pass it through.
templated_args = kwargs.pop("templated_args", []) + ["$(location :%s_devmode_srcs.MF)" % name]

nodejs_test_macro(
name = name,
data = all_data,
entry_point = entry_point,
templated_args = ["$(location :%s_devmode_srcs.MF)" % name],
templated_args = templated_args,
expected_exit_code = expected_exit_code,
tags = tags,
**kwargs
Expand Down

0 comments on commit 01a49a4

Please sign in to comment.