From 5368cc46bbcca6b2628a33ca8127f1ebac004b91 Mon Sep 17 00:00:00 2001 From: Fabian Wiles Date: Wed, 13 Mar 2019 20:57:10 +1300 Subject: [PATCH] fixup --- packages/jasmine/BUILD.bazel | 1 - packages/jasmine/src/jasmine_node_test.bzl | 17 ++--------------- packages/jasmine/src/jasmine_runner.js | 10 +++++----- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/packages/jasmine/BUILD.bazel b/packages/jasmine/BUILD.bazel index 979ccc2231..c38f262374 100644 --- a/packages/jasmine/BUILD.bazel +++ b/packages/jasmine/BUILD.bazel @@ -18,7 +18,6 @@ package(default_visibility = ["//visibility:public"]) exports_files([ "src/jasmine_runner.js", - "src/jasmine_runner_host.js", # Exported to be consumed for generating skydoc. "src/jasmine_node_test.bzl", ]) diff --git a/packages/jasmine/src/jasmine_node_test.bzl b/packages/jasmine/src/jasmine_node_test.bzl index fb99630acb..7b3638178b 100644 --- a/packages/jasmine/src/jasmine_node_test.bzl +++ b/packages/jasmine/src/jasmine_node_test.bzl @@ -51,22 +51,10 @@ def jasmine_node_test( tags = tags, ) - runner_name = name + "." + "runner" - - nodejs_binary( - name = runner_name, - data = [jasmine], - entry_point = "npm_bazel_jasmine/src/jasmine_runner.js", - ) - - all_data = data + srcs + deps + all_data = data + srcs + deps + [jasmine] # code coverage reporting dependancy all_data += ["@npm//v8-coverage"] - all_data += [ - # ":jasmine_node_test_bin_loader.js", - ":" + runner_name, - Label("//:src/jasmine_runner.js"), - ] + all_data += [Label("//:src/jasmine_runner.js")] all_data += [":%s_devmode_srcs.MF" % name] all_data += [Label("@bazel_tools//tools/bash/runfiles")] entry_point = "npm_bazel_jasmine/src/jasmine_runner.js" @@ -78,7 +66,6 @@ def jasmine_node_test( templated_args = ["$(location :%s_devmode_srcs.MF)" % name], testonly = 1, expected_exit_code = expected_exit_code, - configuration_env_vars = ["NODE_V8_COVERAGE"], tags = tags, **kwargs ) diff --git a/packages/jasmine/src/jasmine_runner.js b/packages/jasmine/src/jasmine_runner.js index 58fd00f68d..42c4ad7883 100644 --- a/packages/jasmine/src/jasmine_runner.js +++ b/packages/jasmine/src/jasmine_runner.js @@ -62,7 +62,7 @@ if (TOTAL_SHARDS) { Error.stackTraceLimit = Infinity; const IS_TEST_FILE = /[^a-zA-Z0-9](spec|test)\.js$/i; -const IS_MODULE_MODULE = /\/node_modules\// +const IS_NODE_MODULE = /\/node_modules\// function main(args) { if (!args.length) { @@ -74,10 +74,10 @@ function main(args) { const jrunner = new JasmineRunner({jasmineCore: jasmineCore}); const allFiles = fs.readFileSync(manifest, UTF8) - .split('\n') - .filter(l => l.length > 0) - // Filter out files from node_modules that match test.js or spec.js - .filter(f => !IS_MODULE_MODULE.test(f)) + .split('\n') + .filter(l => l.length > 0) + // Filter out files from node_modules that match test.js or spec.js + .filter(f => !IS_NODE_MODULE.test(f)) // the relative directory the coverage reporter uses to find the files const cwd = process.cwd()