test: cleanup test-utils-inherits.js#12602
test: cleanup test-utils-inherits.js#12602RobotMermaid wants to merge 3 commits intonodejs:masterfrom
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.
Long line here. Lines should not be longer than 80 chars
There was a problem hiding this comment.
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 <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replaced constructor with regular expression for assert.throw(). PR-URL: #12602 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replaced constructor with regular expression for assert.throw(). PR-URL: #12602 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replaced constructor with regular expression for assert.throw(). PR-URL: #12602 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replaced constructor with regular expression for assert.throw(). PR-URL: #12602 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replaced constructor with regular expression for assert.throw(). PR-URL: nodejs/node#12602 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replaced constructor with regular expression for assert.throw().
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)