dfcd53ed180e39bde609fd250885b3fb6afd2fb159bf31a3ae71d3c24c76971952d43549b8c4146d66d470d0223ae69b0df26afab4df1c2c5fecb6b5d31390 533 B

12345678910111213141516171819202122
  1. 'use strict';
  2. var index = require('../');
  3. var test = require('tape');
  4. var runTests = require('./tests');
  5. test('as a function', function (t) {
  6. t.test('bad array/this value', function (st) {
  7. st['throws'](function () { index(undefined); }, TypeError, 'undefined is not an object');
  8. st['throws'](function () { index(null); }, TypeError, 'null is not an object');
  9. st.end();
  10. });
  11. t.test('Typed Array support', { skip: typeof Uint8Array === 'undefined' }, function (st) {
  12. runTests(index, st);
  13. st.end();
  14. });
  15. t.end();
  16. });