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
{{ message }}
Repository navigation
--experimental-test-coverage cannot be used with --test #47669
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 --test lookup for tests in the current project folder. When adding the --experimental-test-coverage flag I get the error node: --experimental-test-coverage cannot be used with --test, and if I remove the --test flag and left the --experimental-test-coverage flag 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 with node --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 --test and look for the test files, or allow to have both --test and --experimental-test-coverage flags 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 --test flag.
Activity
richardlau commentedon Apr 22, 2023
#47651 mentions it is the first step towards addressing this.
richardlau commentedon Apr 22, 2023
This is a documented limitation which looks like it's being worked on.
node/doc/api/test.md
Lines 423 to 432 in 7b39e80
cjihrig commentedon Apr 22, 2023
FWIW, I should have a PR to address this soon - possibly in the next day or so.
piranna commentedon Apr 22, 2023
Thanks for clarifying, subscribed to that PR.
test_runner: support combining coverage reports
test_runner: support combining coverage reports
test_runner: support combining coverage reports
muturgan commentedon Jun 3, 2023
will it be added in version 18?
piranna commentedon Jun 3, 2023
It's already included.
test_runner: support combining coverage reports
test_runner: support combining coverage reports
ccucui commentedon Jul 7, 2023
Hi guys, any release date of the fix for v18?