-
Notifications
You must be signed in to change notification settings - Fork 475
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 broken tests #367
Fix broken tests #367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing this!
Tested it out and this works for me and tests pass and report errors as expected
1623809
to
2d8f9c0
Compare
As I was updating typings for v1.1 when it is released I found that there were some inconsistencies and metadata was being mishandled. Error handling was also broken. I've corrected these issues in this PR as well. |
done(); | ||
} catch (err2) { | ||
done(err2); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test does not appear to actually be async, so could be converted to a sync test without try/catch.
@cjbarth I see that's a lot of work that's been put here. I'm reluctant to merge this because the try/catch syntax is verbose and ugly. I also understand that's solving a real problem with sync errors being thrown in async test. Now that Node 6.x is EOL'ed, we can drop support for it, which means it's safe to start using Still, I realize a release is overdue for for the moment I have gratitude that this fixes for the tests for now, so I'm merging it. |
There were two bugs in the code that were causing the tests to fail. Due to the way the tests were written tests failed as timeouts. I've also adjusted the tests so that when they fail they give useful information.
No functional changes were made to the test. The only changes were to correctly wrap async exception throwing blocks in a
try...catch
and then calldone()
properly so thatmocha
could properly report the error instead of having to wait 2 seconds for timeout and then reporting that instead of the actual error that occured.