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

C8 7.12 and node 18.11: Tests are not running #422

Closed
w3nl opened this issue Oct 15, 2022 · 7 comments
Closed

C8 7.12 and node 18.11: Tests are not running #422

w3nl opened this issue Oct 15, 2022 · 7 comments

Comments

@w3nl
Copy link
Contributor

w3nl commented Oct 15, 2022

C8 version: 7.12.0
Node version: 18.11.0
Platform: Darwin CLC02DRB4AMD6R 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 29 04:31:06 PDT 2022; root:xnu-7195.141.39~2/RELEASE_X86_64 x86_64
(Mac OS 11.7)

When i run node --test src/ my tests are running.
When i use C8 c8 node --test src/, no tests are running, and no coverage.

And I see an error:

ERROR: Coverage for lines (0%) does not meet global threshold (90%)
zsh: segmentation fault  c8 node --test src/

.nycrc

{
  "all": true,
  "include": [
    "src/**/*.js"
  ],
  "exclude": [
    "**/*.test.js",
    "**/__fixtures__/**"
  ],
  "reporter": [
    "text",
    "text-summary",
    "lcov",
    "clover"
  ],
  "check-coverage": true,
  "watermarks": {
    "lines": [
      80,
      95
    ],
    "functions": [
      80,
      95
    ],
    "branches": [
      80,
      95
    ],
    "statements": [
      80,
      95
    ]
  }
}

Tested with node 18.10.0, and it was working

Has node 18.11.0 a breaking change or bug, or is it a C8 issue?

@w3nl
Copy link
Contributor Author

w3nl commented Oct 15, 2022

Here a test with a package in Github actions: https://github.com/hckrnews/objects/actions/runs/3255633842/jobs/5345156351

Segmentation fault (core dumped)
Error: Process completed with exit code 139.

195985740-638d9c7b-02ac-450c-b472-5ea0bc8a7cb1

@w3nl
Copy link
Contributor Author

w3nl commented Oct 15, 2022

Here a test with and without c8: https://github.com/hckrnews/objects/actions/runs/3256091485/jobs/5346101809
node 18.10: works with and without c8
node 18.11: works without c8, but with c8 it failed, no tests are found

@cedx
Copy link

cedx commented Oct 18, 2022

Probably the same issue here: since Node.js 18.11.0, it does not work anymore on my Windows workstation.

$ c8 --all --include=src/**/*.js --report-dir=var --reporter=lcovonly node --test
# No output! It seems that the tests are not run.

But in the CI environment (GitHub Actions, Ubuntu, Node.js 18.10.0), no problem, everything works as expected:
https://github.com/cedx/free-mobile.js/actions/runs/3276489807/jobs/5392601868

@w3nl
Copy link
Contributor Author

w3nl commented Oct 18, 2022

It looks like it is a node bug, there is a node fix already made: nodejs/node#45013
I think in the next node version 18.11.1 or 18.12.0 it will be fixed.

@cedx
Copy link

cedx commented Oct 20, 2022

With Node.js 19:

@w3nl
Copy link
Contributor Author

w3nl commented Oct 23, 2022

In the new version of will include the fix.
Node 18 release date is 25 oktober.
Node 19 release date is 1 november.

Fix was just to late for 19.0.0

@w3nl w3nl closed this as completed Oct 23, 2022
@w3nl
Copy link
Contributor Author

w3nl commented Oct 26, 2022

Fix isnt in node 18.12 from yesterday, i think we have to wait another week
Release schedule for 19.x: nodejs/Release#793

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants