-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix: Always explicitly exit() to avoid hangs #51
Conversation
Fixes this: ```js o.spec('This dangling setInterval', () => { setInterval(() => undefined, 100); o.only('causes ospec to hang', () => { o(true).equals(true); }); }); ```
20d837d
to
e30b439
Compare
|
Any comments @pygy ? |
That sounds good, could you push a dummy commit to re-launch CI? The logs have expired, and I can't find how to relaunch these jobs (neither can I relaunch old Mithril jobs, so it could be an expiration thing here too). |
Pushed a trivial fix to the README, for luck. |
Merging, I'll publish a new version this evening and investigate where |
Many thanks for raising the issue and providing a patch. |
@maranomynet @v4.1.7 is out |
Thank you. |
Description
Fixes this problem:
Motivation and Context
Tests that import code from 3rd party libraries can cause ospec to unexpectedly hang, even though your own code and tests are perfectly fine.
How Has This Been Tested?
By pasting the above code into a file called
hangtest.mjs
and runningospec hangtest.mjs
.Without the fix the process doesn't exit.
With the fix it exits like normal.
Types of changes
Checklist:
BTW: I Can't get the package tests to pass locally (MacOS 12.5) — not even on the untouched
main
branch: