-
Notifications
You must be signed in to change notification settings - Fork 30k
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: cleanup test-utils-inherits.js #12602
Conversation
Commit message should say 'test-util-inherits' (singular). |
Replaced constructor with regular expression for assert.throw().
12085be
to
888d1c1
Compare
Linux CI issues are unrelated. CI looks good. |
test/parallel/test-util-inherits.js
Outdated
}, /^TypeError: The super constructor to "inherits" must have a prototype$/); | ||
assert.throws(function() { | ||
inherits(A, null); | ||
}, /^TypeError: The super constructor to "inherits" must not be null or undefined$/); // eslint-disable-line max-len |
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.
Long line here. Lines should not be longer than 80 chars
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.
Specifically, I know this inlines the eslint rule, but this can be reworked to avoid that entirely...
const errCheck =
new RegExp('^TypeError: The super constructor to "inherits" must not be ' +
'null or undefined$');
assert.throws(() => inherits(A, null), errCheck);
Replaced constructor with regular expression for assert.throw().
Replaced constructor with regular expression for assert.throw().
GitHub reports no merge conflict but CI can't do a checkout because of a merge conflict. I think I've seen this before with a merge commit or something? Anyone remember what's going on? @nodejs/build |
@Trott I think the issue is that when squashed together, the commits here don’t generate a merge conflict, but the partial ones do. I think this is good as-is, the only change since the last CI seems to be moving code around for linting, and this isn’t a platform-dependent test anyway. |
Landed in 2055fd3, thank you a lot for the PR! |
Replaced constructor with regular expression for assert.throw(). PR-URL: #12602 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Replaced constructor with regular expression for assert.throw(). PR-URL: #12602 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Replaced constructor with regular expression for assert.throw(). PR-URL: #12602 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Replaced constructor with regular expression for assert.throw(). PR-URL: #12602 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Replaced constructor with regular expression for assert.throw(). PR-URL: #12602 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Replaced constructor with regular expression for assert.throw(). PR-URL: nodejs/node#12602 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Replaced constructor with regular expression for assert.throw().
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)