You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Darwin Anils-MacBook-Pro.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 arm64
Subsystem
Other
Description
Context
I recently decided to contribute to Node.js and the most logical place for me to start seemed to improve code coverage. I went to https://app.codecov.io/gh/nodejs/node to look for a file that has a low coverage. I chose domexception.js as it has 58.17% coverage.
What is the problem?
As I explore more of the Node.js project, I focused on test/wpt/test-domexception.js as my primary source of tests to work on.
However, when I run make coverage-run-js I get 58.82% of coverage BUT if I run the test-domexception.js individually as described in Running Coverage my results are close to 100% like below:
What would solve my problem?
Answers to the question below would solve my problem;
When trying to improve test coverage, how does the development cycle look for a regular nodejs dev?
What should be my source of truth when working on improving test coverage?
Does the fact that test-domexception.js being run in a WPTRunner cause additional complexity when it comes to code coverage?
Any sort of assistance would be greatly appreciated. Thanks 🙏
Minimal Reproduction
No response
Output
No response
Before You Submit
I have looked for issues that already exist before submitting this
Hey @redyetidev, thanks a lot for your answer. However, I'm still stuck despite trying make coverage-run-js and comparing its results with NODE_V8_COVERAGE=coverage/tmp tools/test.py test/wpt/test-domexception.js.
make coverage-run-js results with 58.82%
NODE_V8_COVERAGE=coverage/tmp tools/test.py test/wpt/test-domexception.js results with 100%
I could understand if test coverage went up as I include more tests(as make coverage-run-js runs all JS tests). But struggling to understand why it goes down compared to running only one test file(test/wpt/test-domexception.js). I am assuming this has something to with WPT tests are run via their own runner(WPTRunner) but I am not certain. Could use any insights. Thanks
The WPT test files aren't the best for calculating code coverage, as they run a suite of predefined tests that aren't controlled by Node.js. That could have something to do with it?
Admittedly, that behavior is quite strange, I might investigate it on my own time.
Node.js Version
v23.0.0-pre
NPM Version
9.8.1
Operating System
Darwin Anils-MacBook-Pro.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 arm64
Subsystem
Other
Description
Context
I recently decided to contribute to Node.js and the most logical place for me to start seemed to improve code coverage. I went to https://app.codecov.io/gh/nodejs/node to look for a file that has a low coverage. I chose
domexception.js
as it has 58.17% coverage.What is the problem?
As I explore more of the Node.js project, I focused on test/wpt/test-domexception.js as my primary source of tests to work on.
However, when I run
make coverage-run-js
I get 58.82% of coverage BUT if I run thetest-domexception.js
individually as described in Running Coverage my results are close to 100% like below:What would solve my problem?
Answers to the question below would solve my problem;
test-domexception.js
being run in aWPTRunner
cause additional complexity when it comes to code coverage?Any sort of assistance would be greatly appreciated. Thanks 🙏
Minimal Reproduction
No response
Output
No response
Before You Submit
The text was updated successfully, but these errors were encountered: