Skip to content

Commit 6de8e51

Browse files
VoltrexKeyvaBethGriggs
authored andcommitted
test: add DataView test entry for whatwg
The WHATWG `ReadableStream` test needs a new test entry for reading a `DataView`. PR-URL: #40622 Fixes: #40612 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 5027e94 commit 6de8e51

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/parallel/test-whatwg-readablestream.js

+15
Original file line numberDiff line numberDiff line change
@@ -1602,3 +1602,18 @@ class Source {
16021602
isReadable(stream, false);
16031603
})().then(common.mustCall());
16041604
}
1605+
1606+
{
1607+
const stream = new ReadableStream({
1608+
type: 'bytes',
1609+
start(controller) {
1610+
controller.close();
1611+
}
1612+
});
1613+
1614+
const buffer = new ArrayBuffer(1024);
1615+
const reader = stream.getReader({ mode: 'byob' });
1616+
1617+
reader.read(new DataView(buffer))
1618+
.then(common.mustCall());
1619+
}

0 commit comments

Comments
 (0)