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: update fixturesDir import #15887
Conversation
Hi, @seabrookmx! Welcome and thanks for this! Can you update this to use |
test/sequential/test-stream2-fs.js
Outdated
const assert = require('assert'); | ||
|
||
const fs = require('fs'); | ||
const FSReadable = fs.ReadStream; | ||
|
||
const path = require('path'); | ||
const file = path.resolve(common.fixturesDir, 'x1024.txt'); | ||
const file = path.resolve(fixturesDir, 'x1024.txt'); |
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.
There is a dedicated fixtures.path
function that could be used here.
Ah, sorry @Trott I did not read your comment before writing mine. |
Import fixturesDir path from common/fixturesDir module rather than from common.
@Trott Thanks for the link. Commit updated 🙇♂️ |
@seabrookmx - thanks, can you also apply @BridgeAR's recommendation to improve the code further? |
test/sequential/test-stream2-fs.js
Outdated
const assert = require('assert'); | ||
|
||
const fs = require('fs'); | ||
const FSReadable = fs.ReadStream; | ||
|
||
const path = require('path'); | ||
const file = path.resolve(common.fixturesDir, 'x1024.txt'); | ||
const file = path.resolve(fixtures.path(), 'x1024.txt'); |
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 just fixtures.path('x1024.txt')
.
Landed in bb56fbb, thank you for the contribution! |
Import fixturesDir path from common/fixturesDir module rather than from common. PR-URL: #15887 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Import fixturesDir path from common/fixturesDir module rather than from common. PR-URL: nodejs/node#15887 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Import fixturesDir path from common/fixturesDir module rather than from common. PR-URL: #15887 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Import fixturesDir path from common/fixturesDir module rather than from common. PR-URL: #15887 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Import fixturesDir path from common/fixturesDir module rather than from common. PR-URL: #15887 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Import fixturesDir path from common/fixturesDir module rather than from common. PR-URL: #15887 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Import fixturesDir path from common/fixturesDir
module rather than from common.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)