You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The promise never resolves (because 1+1 isn't 3), and the VM can garbage collect not only the Promise executor, but also the resolve function (because nothing references it), and from there, surprisingly, it can garbage collect everything because the test of the node process is just waiting on a promise that will never resolve. So the process exits with exit code 0 in the middle of testing!
The text was updated successfully, but these errors were encountered:
rictic
added a commit
to rictic/uvu
that referenced
this issue
May 2, 2022
…ises (#207)
* A test that exits early should fail
Fixes#206
Also fixes the case where a test calls process.exit(0) itself, as that's essentially the same thing.
* Apply suggestions from code review
* wrap exit listener; merge test files
Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
Consider some (slightly contrived) code like:
The promise never resolves (because 1+1 isn't 3), and the VM can garbage collect not only the Promise executor, but also the
resolve
function (because nothing references it), and from there, surprisingly, it can garbage collect everything because the test of the node process is just waiting on a promise that will never resolve. So the process exits with exit code 0 in the middle of testing!The text was updated successfully, but these errors were encountered: