Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unreached lines of code in lib/parse-args.js #489

Open
mcknasty opened this issue Jul 28, 2023 · 0 comments
Open

Unreached lines of code in lib/parse-args.js #489

mcknasty opened this issue Jul 28, 2023 · 0 comments

Comments

@mcknasty
Copy link
Contributor

mcknasty commented Jul 28, 2023

  • Version:
  • Platform:
  • Version:
$ node -v
v16.19.1
  • Platform:
$ uname -a
Linux ********* 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

The variable argv.tempDirectory is set in the following yargs function

The lines in the file lib/parse-args.js is not reached during the test cases and it references this variable.

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 95.84 86.33 100 95.84
bin 90.38 88.88 100 90.38
c8.js 90.38 88.88 100 90.38 27-29,50-51
lib 95.6 84.25 100 95.6
is-cjs-esm-bridge.js 90 62.5 100 90 9
parse-args.js 98.21 75 100 98.21 165-166,201-202
report.js 95.44 90.54 100 95.44 9-10,123,129-132,143-147,248-249,332-333,367-369
source-map-from-file.js 91 71.42 100 91 74-76,91-93,95-97
lib/commands 100 95.45 100 100
check-coverage.js 100 92.85 100 100 26
report.js 100 100 100 100

The variable process.env.NODE_V8_COVERAGE is used as the default for argv.tempDirectory on lines 127 - 130 in lib/parse-args.js. Oddly enough process.env.NODE_V8_COVERAGE is assigned the value of the variable argv.tempDirectory on line of 36 of
bin/c8.js
.

Need to investigate this issue further. Taking some notes as it is referenced in #436

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant