Skip to content

Commit

Permalink
fix(writable): set writableEnded and writableFinished
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 17, 2020
1 parent 2169f92 commit 7058fdc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mock/writable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import type { BufferEncoding, Callback } from '../types'

export class Writable extends EventEmitter implements stream.Writable {
readonly writable: boolean = true
readonly writableEnded: boolean =false
readonly writableFinished: boolean = false
writableEnded: boolean =false
writableFinished: boolean = false
readonly writableHighWaterMark: number = 0
readonly writableLength: number = 0
readonly writableObjectMode: boolean = false
Expand Down Expand Up @@ -62,7 +62,8 @@ export class Writable extends EventEmitter implements stream.Writable {
const encoding = arg2 !== cb ? arg2 : undefined
this.write(data, encoding, cb)
}
// TODO: end
this.writableEnded = true
this.writableFinished = true
}

cork (): void {
Expand Down

0 comments on commit 7058fdc

Please sign in to comment.