Skip to content

Commit

Permalink
test: add DataView test entry for whatwg
Browse files Browse the repository at this point in the history
The WHATWG `ReadableStream` test needs a new test entry for reading a
`DataView`.
  • Loading branch information
VoltrexKeyva committed Oct 27, 2021
1 parent b75b382 commit d66a7ce
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/parallel/test-whatwg-readablestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -1570,3 +1570,18 @@ class Source {
isDisturbed(stream, true);
})().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());
}

0 comments on commit d66a7ce

Please sign in to comment.