1
0

valid-array.js 571 B

1234567891011121314
  1. 'use strict';
  2. module.exports = function (t, a) {
  3. var x;
  4. a.throws(function () { t(); }, TypeError, "Undefined");
  5. a.throws(function () { t(null); }, TypeError, "Null");
  6. a.throws(function () { t(0); }, TypeError, "Number");
  7. a.throws(function () { t(true); }, TypeError, "Boolean");
  8. a.throws(function () { t('raz'); }, TypeError, "String");
  9. a.throws(function () { t(function () {}); }, TypeError, "Function");
  10. a.throws(function () { t({}); }, TypeError, "Object");
  11. a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
  12. a(t(x = []), x, "Array");
  13. };