-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Exit code not preserved on JS heap out of memory (134) from mocha #798
Comments
Just tested again with |
@boneskull any thoughts on this one? I just did some debugging and it looks like https://github.com/tapjs/foreground-child/blob/master/index.js#L68-L70 |
thanks, foreground-child looks useful, and certainly more robust than Mocha's solution. complicating things is that if no signal is received, upon test failure, Mocha will exit with a nonzero code corresponding to the number of test failures. IIRC TeamCity wants this behavior for some reason; I don't know if there's a workaround. happy to revisit if someone wants to send a PR, but would strongly prefer a) not breaking TeamCity, and b) if we do need to break it, find a workaround or migration path for TeamCity + Mocha users. |
Hi @mlrawlings , Were you able to find any work around for this? I'm using nyc with mocha and facing the same issue I'm using "nyc": "^15.1.0", [email protected] and "ts-mocha": "10.0.0", |
Found a possible culprit. [email protected] can set a malformed value as exit code and this causes the exit code to get quietly changed to The failure is not as quiet on Node >=19. |
Expected Behavior
nyc
would exit with the same error code as its subprocessObserved Behavior
nyc
exits with0
rather than134
on JavaScript heap out of memory frommocha
Bonus Points! Code (or Repository) that Reproduces Issue
💻 Set up
✅Prints 134
✅Prints 134
✅Prints 134
❌Prints 0
The text was updated successfully, but these errors were encountered: