Skip to content

Conversation

@garybernhardt
Copy link
Contributor

Fixes #421. Tests pass.

@lovasoa
Copy link
Member

lovasoa commented Oct 3, 2020

Thank you! We should add a test for the new behavior too.

@lovasoa lovasoa merged commit cec3fc6 into sql-js:master Oct 3, 2020
@garybernhardt garybernhardt deleted the issue-421 branch October 12, 2020 20:44
@garybernhardt
Copy link
Contributor Author

I spent a few minutes trying to come up with a test, but I can't get the bug to happen in the tests. I copied an existing test file and replaced its test function with:

exports.test = function(sql, assert) {
  // Intentionally leak a rejected promise
  Promise.reject("failure")
};

but that doesn't cause a test failure on the commit before the fix (e1ff5dc). I also tried various tricks to try to wait, in case the process was exiting too fast, but it seems like test functions can't return promises.

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

Successfully merging this pull request may close these issues.

Loading sql.js in Node makes it terminate the process when unrelated promise rejections are unhandled

2 participants