-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Can't use with --experimental-test-coverage --test #437
Comments
Is this a duplicate of #433? |
Sorry for not spotting this issue earlier, I might have added a comment on it. |
This comment has been minimized.
This comment has been minimized.
@privatenumber I tried the solution you suggested in #433 locally and ran Edit: also I've been running the code with Node v21.x where the condition is supposed to be true ( |
This comment was marked as off-topic.
This comment was marked as off-topic.
Node team has addressed that in nodejs/node#52775 to remove the error, the coverage though is still useless. One thing that we saw is that it probably has to do with the source map generation, but I haven't yet tested it |
I left a comment in nodejs/node#52775 (comment), but tsx has source maps with V8 coverage support (released 5 days ago in v4.10.4). I tested the minimal reproduction, and using c8 without
Verified coverage is working with:
But this doesn't with
IMO this is an issue blocked by Node.js |
This comment has been minimized.
This comment has been minimized.
works for me now using node 22.3.0, looks like it was a node issue fixed by nodejs/node#53315 which was just shipped |
Thanks. Confirmed working with Node v22.3.0:
|
Acknowledgements
Minimal reproduction URL
https://codesandbox.io/p/devbox/tsx-import-coverage-dkkgs3
I had to use codesandbox to have recent node version, you need local reproduction:
package.json
index.test.ts
Version
4.6.2
Node.js version
v20+
Package manager
npm
Operating system
Linux
Problem & Expected behavior
I'm trying to get tsx to work with the native test runner, coverage included
It seems to be failing with the following warning:
Also, c8 is not able to generate any report:
Contributions
The text was updated successfully, but these errors were encountered: