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

Support for Node's new built-in test runner (node --test) #424

Closed
AviVahl opened this issue Nov 3, 2022 · 2 comments
Closed

Support for Node's new built-in test runner (node --test) #424

AviVahl opened this issue Nov 3, 2022 · 2 comments
Labels

Comments

@AviVahl
Copy link

AviVahl commented Nov 3, 2022

  • Version: 18.12.0
  • Platform: Linux fedora 6.0.5-200.fc36.x86_64

Node 18 now has a built-in test runner. It has also been back-ported to 16.
I've tried using c8 with it, and all I get is:

> c8 node --test --enable-source-maps

----------|---------|----------|---------|---------|-------------------
File      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
----------|---------|----------|---------|---------|-------------------
All files |       0 |        0 |       0 |       0 |                   
----------|---------|----------|---------|---------|-------------------
Segmentation fault (core dumped)

Steps to reproduce:

  • clone https:/wixplosives/sample-monorepo
  • npm i c8 -D
  • open package.json and edit test:node. prefix it with c8 so it says: "test:only": "c8 node --test --enable-source-maps",
  • npm t
@bcoe
Copy link
Owner

bcoe commented Nov 3, 2022

I believe this is caused by:

nodejs/node#45013

And can't be fixed in c8 itself. You can confirm by running your tests with NODE_V8_COVERAGE=/tmp/coverage, without c8.

@bcoe bcoe added the wontfix label Nov 3, 2022
@AviVahl
Copy link
Author

AviVahl commented Nov 3, 2022

Thanks for the info. I'll try again with the next node version.

@AviVahl AviVahl closed this as completed Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants