Skip to content

Commit 1a235e0

Browse files
devversiondgp1130
authored andcommitted
build: improve globbing of jasmine test files
This doesn't seem to surface here, but in the framework and in the COMP repo, the glob wasn't catching all files because it wasn't escpaed— so didn't actually get picked up by Jasmine, but was expanded by Bash. This improves this and makes this logic more future-proof.
1 parent ad11f7e commit 1a235e0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/defaults.bzl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ def jasmine_test(data = [], args = [], **kwargs):
6565
chdir = native.package_name(),
6666
args = [
6767
"--require=%s/node_modules/source-map-support/register.js" % relative_to_root,
68-
"**/*spec.js",
69-
"**/*spec.mjs",
70-
"**/*spec.cjs",
68+
# Escape so that the `js_binary` launcher triggers Bash expansion.
69+
"'**/*+(.|_)spec.js'",
70+
"'**/*+(.|_)spec.mjs'",
71+
"'**/*+(.|_)spec.cjs'",
7172
] + args,
7273
data = data + ["//:node_modules/source-map-support"],
7374
**kwargs

0 commit comments

Comments
 (0)