0b96475422bb41904c83c055609db2453a02fea00cd74ffdb9f26574a87ce917900a78f2ca3e0a0639f15bc39557c599c948958d00bc5978870d0f4a4edbae 750 B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. var implementation = require('../implementation');
  3. var callBind = require('call-bind');
  4. var test = require('tape');
  5. var hasStrictMode = require('has-strict-mode')();
  6. var runTests = require('./tests');
  7. test('as a function', function (t) {
  8. t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
  9. /* eslint no-useless-call: 0 */
  10. st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
  11. st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
  12. st.end();
  13. });
  14. t.test('Typed Array support', { skip: typeof Uint8Array === 'undefined' }, function (st) {
  15. runTests(callBind(implementation), st);
  16. st.end();
  17. });
  18. t.end();
  19. });