Skip to content

Commit

Permalink
test(hash-stream-node): check for pipesCount in _readableState
Browse files Browse the repository at this point in the history
The pipes array was added in v13.0.0
nodejs/node#28583
  • Loading branch information
trivikr committed Dec 10, 2021
1 parent bbd7642 commit 1f9661f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/hash-stream-node/src/readableStreamHasher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ describe(readableStreamHasher.name, () => {
const hashPromise = readableStreamHasher(mockHashCtor, readableStream);

// @ts-ignore Property '_readableState' does not exist on type 'Readable'.
const { pipes } = readableStream._readableState;
expect(pipes.length).toEqual(1);
expect(pipes[0]).toBeInstanceOf(MockHashCalculator);
const { pipesCount } = readableStream._readableState;
expect(pipesCount).toEqual(1);

const mockDataChunks = ["Hello", "World"];
setTimeout(() => {
Expand Down

0 comments on commit 1f9661f

Please sign in to comment.