MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / testInvalidOffset

Function testInvalidOffset

test/dataview/dataview_read_write.js:54–62  ·  view source on GitHub ↗
(dataview, type, offset, value)

Source from the content-addressed store, hash-verified

52 }
53
54 function testInvalidOffset (dataview, type, offset, value) {
55 assert.throws(() => {
56 nativeReadDataView(dataview, type, offset);
57 }, RangeError);
58
59 assert.throws(() => {
60 nativeWriteDataView(dataview, type, offset, value);
61 }, RangeError);
62 }
63
64 const dataview = new DataView(new ArrayBuffer(22));
65

Callers 1

testFunction · 0.85

Calls 2

nativeReadDataViewFunction · 0.85
nativeWriteDataViewFunction · 0.85

Tested by 1

testFunction · 0.68