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 5d94d94 commit f38592d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/parallel/test-whatwg-readablestream.js
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 f38592d

Please sign in to comment.