From e9bbfbc62448013f4659cb5a67be1c5453976cd9 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Wed, 2 Sep 2020 20:45:59 +0000 Subject: [PATCH] node tests: Clean up nyc arguments. nyc was added in 29f04511c00faa97c919a9084707d539d5b11d41 All the stuff after "&&" was actually passed to node, because we didn't use shell=True, so the "nyc report" command didn't run, and the ugly finder.js code just skipped over all the final tokens. --- tools/test-js-with-node | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/test-js-with-node b/tools/test-js-with-node index e90d745987..1100020079 100755 --- a/tools/test-js-with-node +++ b/tools/test-js-with-node @@ -223,15 +223,13 @@ def run_tests_via_node_js() -> int: node_tests_cmd += individual_files if options.coverage: coverage_dir = os.path.join(ROOT_DIR, 'var/node-coverage') - coverage_lcov_file = os.path.join(coverage_dir, 'lcov.info') - nyc = os.path.join(ROOT_DIR, 'node_modules/.bin/nyc') - command = [nyc, '--extension', '.hbs', '--extension', '.ts'] - command += ['--report-dir', coverage_dir] - command += ['--temp-directory', coverage_dir, '-r=text-summary'] + nyc = os.path.join(ROOT_DIR, "node_modules/.bin/nyc") + command = [nyc, "--extension", ".hbs", "--extension", ".ts"] + command += ["--report-dir", coverage_dir] + command += ["--temp-directory", coverage_dir] + command += ["-r=lcov", "-r=json", "-r=text-summary"] command += node_tests_cmd - command += ['&&', 'nyc', 'report', '-r=lcov', '-r=json'] - command += ['>', coverage_lcov_file] else: # Normal testing, no coverage analysis. # Run the index.js test runner, which runs all the other tests.