Skip to content

Commit

Permalink
chore: mocha example doesn't need copy_to_bin (#223)
Browse files Browse the repository at this point in the history
js_test will copy data files to bin that are in the current bazel package
  • Loading branch information
alexeagle authored Jun 17, 2022
1 parent 9e9106a commit 3eb2fb8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions examples/macro/mocha.bzl
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
"Example macro wrapping the mocha CLI"

load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@npm//examples/macro/mocha:package_json.bzl", "bin")

def mocha_test(name, srcs, args = [], data = [], env = {}, **kwargs):
copy_to_bin(
name = "_%s_srcs" % name,
srcs = srcs,
)
bin.mocha_test(
name = name,
args = [
Expand All @@ -17,8 +12,7 @@ def mocha_test(name, srcs, args = [], data = [], env = {}, **kwargs):
"configFile=$(location //examples/macro:mocha_reporters.json)",
native.package_name() + "/*test.js",
] + args,
data = data + [
"_%s_srcs" % name,
data = data + srcs + [
"//examples/macro:mocha_reporters.json",
"//examples/macro:node_modules/mocha-multi-reporters",
"//examples/macro:node_modules/mocha-junit-reporter",
Expand Down

0 comments on commit 3eb2fb8

Please sign in to comment.