Skip to content

Commit 1f9661f

Browse files
committed
test(hash-stream-node): check for pipesCount in _readableState
The pipes array was added in v13.0.0 nodejs/node#28583
1 parent bbd7642 commit 1f9661f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/hash-stream-node/src/readableStreamHasher.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ describe(readableStreamHasher.name, () => {
5252
const hashPromise = readableStreamHasher(mockHashCtor, readableStream);
5353

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

5958
const mockDataChunks = ["Hello", "World"];
6059
setTimeout(() => {

0 commit comments

Comments
 (0)