| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| const expected = | ||
| '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'}`; |
There was a problem hiding this comment.
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)?
Sorry, something went wrong.
There was a problem hiding this comment.
Actually since expected is later used with str.includes(expected) you could remove the EOL completely, and fit the string in a single line.
Sorry, something went wrong.
There was a problem hiding this comment.
@gibfahn sure, it will come soon~
Sorry, something went wrong.
There was a problem hiding this comment.
@refack Sorry, I can't get your meanings. Do you mean the code afterconst expected ... to be one line?
Sorry, something went wrong.
There was a problem hiding this comment.
@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).
Sorry, something went wrong.
There was a problem hiding this comment.
@nathansmile sorry I missed your comment. But I landed it since it's good. 😄
Sorry, something went wrong.
|
@nathansmile thank you for the contribution. Hope you follow up on this and make it even better 👍 |
Sorry, something went wrong.
|
@nathansmile I think @refack meant since expected is tested with str.includes, we do not actually expect an exact match here so the test should still pass without an EOL at the end of expected. Although I think it still does not fit into one single line after dropping the EOL.. |
Sorry, something went wrong.
|
BTW personally I think we should keep the EOL in expected because we would actually want to make sure there is a line break here...otherwise the output might look a bit awkward. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM if CI is green
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM if CI is green
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM if CI is green.
Sorry, something went wrong.
PR-URL: nodejs#14342 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
PR-URL: #14342 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
PR-URL: #14342 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
| Back | FazBrowse Home | New Git URL |
replace string concatenation in test/parallel/test-icu-data-dir.js with template literals
Checklist
Affected core subsystem(s)