Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
[JsConf Code & Learn]test: replace string concatenation with template literals#14342
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
test/parallel/test-icu-data-dir.js Outdated
| constexpected= | ||
| 'could not initialize ICU (check NODE_ICU_DATA or '+ | ||
| '--icu-data-dir parameters)'+(common.isWindows ? '\r\n' : '\n'); | ||
| `--icu-data-dir parameters)${common.isWindows ? '\r\n' : '\n'}`; |
gibfahnJul 18, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
While you're here, could you replace ${common.isWindows ? '\r\n' : '\n'} with ${os.EOL} (you'll have to const os = require('os') after line 2 as well)?
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.
Actually since expected is later used with str.includes(expected) you could remove the EOL completely, and fit the string in a single line.
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.
@gibfahn sure, it will come soon~
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.
@refack Sorry, I can't get your meanings. Do you mean the code afterconst expected ... to be one line?
gibfahnJul 20, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
@refack means this:
- '--icu-data-dir parameters)' + (common.isWindows ? '\r\n' : '\n');+ '--icu-data-dir parameters)'but it was fine as it is (and arguably slightly better).
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.
@nathansmile sorry I missed your comment. But I landed it since it's good. 😄
refack commented Jul 18, 2017
@nathansmile thank you for the contribution. Hope you follow up on this and make it even better 👍 |
joyeecheung commented Jul 19, 2017
@nathansmile I think @refack meant since |
joyeecheung commented Jul 19, 2017
BTW personally I think we should keep the EOL in |
joyeecheung left a comment
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
joyeecheung commented Jul 19, 2017
Trott left a comment
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
Trott left a comment
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.
PR-URL: nodejs#14342 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
refack commented Jul 19, 2017
Landed in 01eddd9 |
PR-URL: #14342 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #14342 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
replace string concatenation in test/parallel/test-icu-data-dir.js with template literals
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)