-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: add TailFileStream #1
Conversation
index.js
Outdated
this.emit('open', this.#fd) | ||
this.emit('ready') |
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.emit('open', this.#fd) | |
this.emit('ready') | |
process.nextTick(() => { | |
this.emit('open', this.#fd) | |
this.emit('ready') | |
}) |
Co-authored-by: Matteo Collina <matteo.collina@gmail.com>
test/close.test.js
Outdated
|
||
stream.on('data', () => {}) | ||
stream.on('end', () => { | ||
stream.close(done) |
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.
calling stream.close(done)
should not be necessary, it should auto-close on 'end'
or 'close'
.
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.
I added this test to test this line behavior:
Line 190 in eeb90ca
if (typeof cb === 'function') finished(this, cb) |
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
No description provided.