-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Improve checks for Error in onerror handlers #1468
Improve checks for Error in onerror handlers #1468
Conversation
expose: true | ||
}); | ||
|
||
assert.doesNotThrow(() => app.onerror(error)); |
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.
I checked that this is failing in master.
.get('/') | ||
.expect(418); | ||
|
||
await gotRightErrorPromise; |
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.
I checked that both assertions are failing in master.
@@ -248,7 +281,7 @@ describe('ctx.onerror(err)', () => { | |||
}); | |||
|
|||
app.use(async ctx => { | |||
throw {key: 'value'}; // eslint-disable-line no-throw-literal | |||
throw { key: 'value' }; // eslint-disable-line no-throw-literal |
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.
Looks like my editor fixed some lint warnings automatically, please tell me if you'd prefer that I revert that.
Codecov Report
@@ Coverage Diff @@
## master #1468 +/- ##
=======================================
Coverage 99.38% 99.38%
=======================================
Files 4 4
Lines 485 489 +4
Branches 132 136 +4
=======================================
+ Hits 482 486 +4
Partials 3 3
Continue to review full report at Codecov.
|
Fixes #1466