Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Windows: jasmine_node_test uses nodejs_test_macro #701

Merged
merged 2 commits into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions internal/jasmine_node_test/jasmine_node_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ than launching a test in Karma, for example.
"""

load("//internal/common:devmode_js_sources.bzl", "devmode_js_sources")
load("//internal/node:node.bzl", "nodejs_test")
load("//internal/node:node.bzl", "nodejs_test_macro")

def jasmine_node_test(
name,
Expand Down Expand Up @@ -59,15 +59,13 @@ def jasmine_node_test(
all_data = data + srcs + deps
all_data += [Label("//internal/jasmine_node_test:jasmine_runner.js")]
all_data += [":%s_devmode_srcs.MF" % name]
all_data += [Label("@bazel_tools//tools/bash/runfiles")]
entry_point = "build_bazel_rules_nodejs/internal/jasmine_node_test/jasmine_runner.js"

nodejs_test(
nodejs_test_macro(
name = name,
data = all_data,
entry_point = entry_point,
templated_args = ["$(location :%s_devmode_srcs.MF)" % name],
testonly = 1,
expected_exit_code = expected_exit_code,
tags = tags,
**kwargs
Expand Down
2 changes: 1 addition & 1 deletion internal/npm_package/test/npm_package.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function read(p) {
// So instead we lookup the sibling file (the primary output of the test rule)
// and bootstrap the filesystem lookup from there.
const dir =
path.dirname(require.resolve('build_bazel_rules_nodejs/internal/npm_package/test/test.sh'));
path.dirname(require.resolve('build_bazel_rules_nodejs/internal/npm_package/test/test'));
return fs.readFileSync(path.join(dir, 'test_pkg', p), {encoding: 'utf-8'}).trim();
}

Expand Down