-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 string concatenation with template literals #14280
Conversation
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.
Maybe this instead?:
const fixturesDir = common.fixturesDir;
const content = require(
`${fixturesDir}/json-with-directory-name-module/module-stub/one/two/three.js`
);
Yeah, this looks much better, I've changed it @Trott |
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
@@ -23,8 +23,10 @@ | |||
const common = require('../common'); | |||
const assert = require('assert'); | |||
|
|||
const content = require(common.fixturesDir + | |||
'/json-with-directory-name-module/module-stub/one/two/three.js'); | |||
const fixturesDir = common.fixturesDir; |
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.
This is Ok.
But it would be much better to use path.join
instead, see #14272 (comment)
You could even do it with multiple parts
const filePath = path.join(
common.fixturesDir,
'json-with-directory-name-module',
'module-stub',
'one-trailing-slash',
'two',
'three.js'
);
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.
Thanks for suggestion, I like the path.join
way
Assuming that CI is healed from back pressure (how to verify that? I see only 5 jobs in the pipeline) issued a fresh one: https://ci.nodejs.org/job/node-test-pull-request/9183/ Also, is it possible to |
@gireeshpunathil It's subjective. Things get ugly in the CI interface after 15 jobs are in the pipeline, so I would take that as an absolute hard limit. But even at 10 jobs, it means delaying other people who are trying to use CI by potentially hours. So for small changes (like most I'd also note that the 5-job recommendation above is taking into account that our CI is much slower right now than is usually is (because Node.js startup is much slower now than it usually is due to the temporary disabling of V8 snapshots in Node.js). In more typical times, I'd probably put that suggested limit to more like 8 or 10 jobs. |
@gireeshpunathil I don't think so, but maybe someone in @nodejs/build knows otherwise... |
No. The closest you can get is the Rebuild plugin (nodejs/build#672). |
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.
💯
Thank you!
PR-URL: nodejs#14280 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
Landed in 8ddb725 |
PR-URL: #14280 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #14280 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #14280 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #14280 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #14280 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #14280 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
from Workshop Code + Learn
replace string concatenation in test/parallel/test-require-extensions-same-filename-as-dir.js with template literals.