Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: add DataView test entry for whatwg
The WHATWG `ReadableStream` test needs a new test entry for reading a
`DataView`.
  • Loading branch information
VoltrexKeyva committed Jan 19, 2022
commit 429009a7db9d5df6b79f3cdd8a796201a8e1e799
15 changes: 15 additions & 0 deletions test/parallel/test-whatwg-readablestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -1602,3 +1602,18 @@ class Source {
isReadable(stream, false);
})().then(common.mustCall());
}

{
const stream = new ReadableStream({
type: 'bytes',
start(controller) {
controller.close();
}
});

const buffer = new ArrayBuffer(1024);
const reader = stream.getReader({ mode: 'byob' });

reader.read(new DataView(buffer))
.then(common.mustCall());
}