Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

xeodou
Copy link
Contributor

@xeodou xeodou commented Jul 16, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jul 16, 2017
@Trott Trott added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Jul 16, 2017
@TimothyGu TimothyGu added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. and removed code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. labels Jul 16, 2017
@@ -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)}`
Copy link
Member

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.

@xeodou
Copy link
Contributor Author

xeodou commented Jul 16, 2017

/ping @Trott The change is fixed.

Copy link
Member

@Trott Trott left a 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!

@vsemozhetbyt
Copy link
Contributor

@Trott
Copy link
Member

Trott commented Jul 16, 2017

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.

Copy link
Member

@gireeshpunathil gireeshpunathil left a 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

@tniessen
Copy link
Member

@gireeshpunathil Even though I agree, that is out of the scope of this PR. These error messages are generated automatically by internal/errors.

Trott pushed a commit to Trott/io.js that referenced this pull request Jul 24, 2017
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>
@Trott
Copy link
Member

Trott commented Jul 24, 2017

Landed in 3566195

Thanks for the contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.