-
Notifications
You must be signed in to change notification settings - Fork 30k
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: In test/parallel/test-https-drain.js, use fixtures.fixturesDir #15841
test: In test/parallel/test-https-drain.js, use fixtures.fixturesDir #15841
Conversation
There is already a function that does the path.join() with fixturesDir. So this commit just uses that.
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 the contribution!
test/parallel/test-https-drain.js
Outdated
|
||
const options = { | ||
key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')), | ||
cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem')) | ||
key: fs.readFileSync(fixtures.path('test_key.pem')), |
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 could be cleaned up further by making use of fixtures.readSync()
to replace the fs.readFileSync
and the path.join
!
Something like key: fixtures.readSync('test_key.pem'),
@szhangpitt if you could push another commit to your branch that makes the change @rmg suggested that'd be ideal. |
Thanks for the suggestion! will push another commit soon. |
Based on @rmg suggestion, use fixtures.path() in place of fs.readFileSync()
@@ -21,17 +21,17 @@ | |||
|
|||
'use strict'; | |||
const common = require('../common'); | |||
const fixtures = require('../common/fixtures'); |
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.
Nit: can you please move this after the common.hasCrypto
check?
Landed in 84f6964 with #15841 (review) fixed. Thanks! |
PR-URL: #15841 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs/node#15841 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #15841 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #15841 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #15841 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #15841 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
This is a task at Node.js Interactive 2017 Code & Learn. The task reads:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)