Sha256: 4c2c300737fd5f1d1837bf7b610145fb61db6a11459843869231e7321da27a93
Contents?: true
Size: 684 Bytes
Versions: 27
Compression:
Stored size: 684 Bytes
Contents
'use strict'; var test = require('tape'); var availableTypedArrays = require('available-typed-arrays')(); var forEach = require('for-each'); var v = require('es-value-fixtures'); var inspect = require('object-inspect'); var typedArrayBuffer = require('../'); test('typedArrayBuffer', function (t) { forEach(v.primitives.concat(v.objects), function (nonTA) { t['throws'](function () { typedArrayBuffer(nonTA); }, TypeError, inspect(nonTA) + ' is not a Typed Array'); }); forEach(availableTypedArrays, function (TA) { var ta = new global[TA](0); t.equal(typedArrayBuffer(ta), ta.buffer, inspect(ta) + ' has the same buffer as its own buffer property'); }); t.end(); });
Version data entries
27 entries across 27 versions & 2 rubygems