Skip to content

Commit 122eb51

Browse files
VoltrexKeyvadanielleadams
authored andcommitted
test: add DataView test entry for whatwg
The WHATWG `ReadableStream` test needs a new test entry for reading a `DataView`. PR-URL: #40622Fixes: #40612 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 4f4fec4 commit 122eb51

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎test/parallel/test-whatwg-readablestream.js‎

Lines changed: 15 additions & 0 deletions
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+
conststream=newReadableStream({
1608+
type: 'bytes',
1609+
start(controller){
1610+
controller.close();
1611+
}
1612+
});
1613+
1614+
constbuffer=newArrayBuffer(1024);
1615+
constreader=stream.getReader({mode: 'byob'});
1616+
1617+
reader.read(newDataView(buffer))
1618+
.then(common.mustCall());
1619+
}

0 commit comments

Comments
 (0)