-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: replace concatenation with template literals. #14281
Conversation
@@ -218,8 +218,7 @@ function checkFormat(path, testCases) { | |||
}, common.expectsError({ | |||
code: 'ERR_INVALID_ARG_TYPE', | |||
type: TypeError, | |||
message: 'The "pathObject" argument must be of type Object. Received ' + | |||
'type ' + typeName(pathObject) | |||
message: `The "pathObject" argument must be of type Object. Received type ${typeName(pathObject)}` |
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.
Does this get flagged as too long when you run make jslint
(or vcbuild jslint
on Windows)?
If so, maybe it can be split onto two lines?:
message: 'The "pathObject" argument must be of type Object. ' +
`Received type ${typeName(pathObject)}`;
It only gets rid of one of the concatenations rather than both that way, but I'm not sure there's a good way around it with the line length limit.
0bee10a
to
4c61fdb
Compare
/ping @Trott The change is fixed. |
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.
LGTM if CI is green!
CI was green but I canceled some of the slower hosts to help with our CI jobs backlog. IMO this can be considered green CI. |
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.
It would have been good to improve the cohesion
and clarity
by joining the two sentences with a preposition such as but
or instead
@gireeshpunathil Even though I agree, that is out of the scope of this PR. These error messages are generated automatically by |
PR-URL: nodejs#14281 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 3566195 Thanks for the contribution! 🎉 |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)