Repository navigation
--experimental-test-coverage cannot be used with --test #47669
Copy link
Copy link
Closed
Labels
known limitationIssues that are identified as known limitations.Issues that are identified as known limitations.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
Description
Activity
#47651 mentions it is the first step towards addressing this.
This is a documented limitation which looks like it's being worked on.
Lines 423 to 432 in 7b39e80
The test runner's code coverage functionality has the following limitations, which will be addressed in a future Node.js release: * Although coverage data is collected for child processes, this information is not included in the coverage report. Because the command line test runner uses child processes to execute test files, it cannot be used with `--experimental-test-coverage`. * Source maps are not supported. * Excluding specific files or directories from the coverage report is not supported. FWIW, I should have a PR to address this soon - possibly in the next day or so.
Reacted by Richard Lau, Moshe Atlow, Damien Seguin and Albert MañosaReacted by Richard Lau, Jesús Leganés-Combarro, Chemi Atlow and Albert Mañosa#47651 mentions it is the first step towards addressing this.
Thanks for clarifying, subscribed to that PR.
- addedknown limitationIssues that are identified as known limitations.Issues that are identified as known limitations.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
on Apr 22, 2023 - added a commit that references this issue
on Apr 28, 2023 - added 2 commits that reference this issue
on May 2, 2023 will it be added in version 18?
will it be added in version 18?
It's already included.
- added a commit that references this issue
on Jul 6, 2023 - added a commit that references this issue
on Jul 6, 2023 Hi guys, any release date of the fix for v18?
Metadata
Metadata
Assignees
Labels
known limitationIssues that are identified as known limitations.Issues that are identified as known limitations.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
Version
v20.0.0
Platform
Linux executive 5.19.0-40-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 23 21:39:15 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
test
What steps will reproduce the bug?
Running
node --testlookup for tests in the current project folder. When adding the--experimental-test-coverageflag I get the errornode: --experimental-test-coverage cannot be used with --test, and if I remove the--testflag and left the--experimental-test-coverageflag alone, it throws me to a REPL without looking for the tests. Only way to run the tests with code coverage is by executing it explicitly withnode --experimental-test-coverage test.js, passing test files as arguments.How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior? Why is that the expected behavior?
When running
node --experimental-test-coverage, it should implicitly call--testand look for the test files, or allow to have both--testand--experimental-test-coverageflags in the same command.What do you see instead?
Error
node: --experimental-test-coverage cannot be used with --test, or a REPL if I remove the--testflag.Additional information
No response