-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: change call to deprecated util.isError() #3084
Conversation
LGTM |
1 similar comment
LGTM |
Maybe this test should use |
@ChALkeR Sure! How's it look now? /cc @targos @brendanashworth |
CI with new changes: https://ci.nodejs.org/job/node-test-commit/694/ |
var exceptionCaught = false; | ||
|
||
try { | ||
const shouldThrow = function() { |
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.
Why not the function declaration form?
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.
There were no other functions defined in the file, so I did function expressions because it is what I tend to use. There is precedence for function expressions in test/parallel
files. test-http-parser.js
has 21 function expressions. Still, it was basically an arbitrary decision on my part and I can switch them to function declarations in this file if you or anyone else has a strong preference.
Can I get a confirmation LGTM for the additional change? @ChALkeR @targos @brendanashworth |
LGTM |
1 similar comment
LGTM |
Landed in 5bbc6df |
common.Error() is just util.isError() which is deprecated. Use assert.throws() instead. PR-URL: #3084 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]>
common.Error() is just util.isError() which is deprecated. Use assert.throws() instead. PR-URL: #3084 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Landed in v4.x-staging in 5bb6e0f |
common.Error() is just util.isError() which is deprecated. Use assert.throws() instead. PR-URL: #3084 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]>
common.isError()
is just the deprecatedutil.isError()
. Replace withinstanceof Error
check.