-
Notifications
You must be signed in to change notification settings - Fork 94
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
Crash when using c8 node --test
#432
Comments
Would someone please take a look at this? It's blocking usage of c8 for newer node versions. |
@remcohaszing would you be able to provide a minimal reproduction that demonstrates this behaviour? |
@jamiehodge @remcohaszing actually, I think this might relate to: Could you try the latest release of Node.js? |
I am still able to reproduce this using Node.js 16.19.0 (in Docker), but not with Node.js 18.14.0 (in Docker) or 19.6.1 (Linux host machine). This gives me the impression this is caused by a bug in Node.js that has been fixed in the version 18 releases, but has not been backported into Node.js 16. I used these test files: // package.json
{
"type": "module",
"dependencies": {
"c8": "7.13.0"
}
} // index.js
export const bool = true // test.js
import assert from 'node:assert/strict'
import { test } from 'node:test'
import { bool } from './index.js'
test('coverage', () => {
assert.ok(bool)
}) |
I have fixed my issue by moving to node:20 image in my github actions |
Same issue here: import { test } from "node:test";
import { strict as assert } from "node:assert/strict";
test("crash test", () => {
assert.equal(true, true);
}); Results in:
Test runs ok on Node 18 and Node 20 It really depends on the
Hope this helps. Hans |
Running
node --test
works fine. Runningc8 node tests/*.test.js
works fine too. However, runningc8 node --test
causes a segmentation fault.The text was updated successfully, but these errors were encountered: