mirror of https://github.com/zulip/zulip.git
node tests: Clean up nyc arguments.
nyc was added in 29f04511c0
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.
This commit is contained in:
parent
b84260014a
commit
e9bbfbc624
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue