Skip to content

Commit d66a7ce

Browse files
committed
test: add DataView test entry for whatwg
The WHATWG `ReadableStream` test needs a new test entry for reading a `DataView`.
1 parent b75b382 commit d66a7ce

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/parallel/test-whatwg-readablestream.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,3 +1570,18 @@ class Source {
15701570
isDisturbed(stream, true);
15711571
})().then(common.mustCall());
15721572
}
1573+
1574+
{
1575+
const stream = new ReadableStream({
1576+
type: 'bytes',
1577+
start(controller) {
1578+
controller.close();
1579+
}
1580+
});
1581+
1582+
const buffer = new ArrayBuffer(1024);
1583+
const reader = stream.getReader({ mode: 'byob' });
1584+
1585+
reader.read(new DataView(buffer))
1586+
.then(common.mustCall());
1587+
}

0 commit comments

Comments
 (0)