Skip to content

Commit 15b2af3

Browse files
committed
Fix byteOffset error for DataView in Node.js 0.10
1 parent 86c55d8 commit 15b2af3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/node/types.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ for (var _i = 0, _arr = [
6161
[function () { return new Set()[Symbol.iterator](); }, 'isSetIterator'],
6262
[function () { return new WeakMap(); }, 'isWeakMap'],
6363
[function () { return new WeakSet(); }, 'isWeakSet'],
64-
[function () { return new ArrayBuffer(); }, 'isArrayBuffer'],
64+
[function () { return new ArrayBuffer(1); }, 'isArrayBuffer'],
6565
[function () { return new Uint8Array(); }, 'isUint8Array'],
6666
[function () { return new Uint8ClampedArray(); }, 'isUint8ClampedArray'],
6767
[function () { return new Uint16Array(); }, 'isUint16Array'],
@@ -82,7 +82,7 @@ for (var _i = 0, _arr = [
8282
value: 'foo'
8383
});
8484
}, 'isUint8Array'],
85-
[function () { return new DataView(new ArrayBuffer()); }, 'isDataView'],
85+
[function () { return new DataView(new ArrayBuffer(1)); }, 'isDataView'],
8686
[function () { return new SharedArrayBuffer(); }, 'isSharedArrayBuffer'],
8787
// [ new Proxy({}, {}), 'isProxy' ],
8888
[function () { return new WebAssembly.Module(wasmBuffer); }, 'isWebAssemblyCompiledModule']
@@ -167,7 +167,7 @@ if (SymbolToStringTagSupported) {
167167

168168
{
169169
var primitive = function primitive() { return true; };
170-
var arrayBuffer = function arrayBuffer() { return new ArrayBuffer(); };
170+
var arrayBuffer = function arrayBuffer() { return new ArrayBuffer(1); };
171171

172172
var buffer = function buffer() { return Buffer.from(arrayBuffer()); };
173173
var dataView = function dataView() { return new DataView(arrayBuffer()); };

0 commit comments

Comments
 (0)