We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5e0947 commit 2114f02Copy full SHA for 2114f02
tools/defaults2.bzl
@@ -8,10 +8,18 @@ def ts_project(**kwargs):
8
def npm_package(**kwargs):
9
_npm_package(**kwargs)
10
11
-def jasmine_test(**kwargs):
+def jasmine_test(data = [], **kwargs):
12
+ # Create relative path to root, from current package dir. Necessary as
13
+ # we change the `chdir` below to the package directory.
14
+ relative_to_root = "/".join([".."] * len(native.package_name().split("/")))
15
+
16
_jasmine_test(
17
node_modules = "//:node_modules",
18
chdir = native.package_name(),
- args = ["**/*.js"],
19
+ args = [
20
+ "--require=%s/node_modules/source-map-support/register.js" % relative_to_root,
21
+ "**/*.js",
22
+ ],
23
+ data = data + ["//:node_modules/source-map-support"],
24
**kwargs
25
)
0 commit comments