3 var iteratorSymbol = require('es6-symbol').iterator;
5 module.exports = function (t, a) {
7 a.throws(function () { t(0); }, TypeError, "0");
8 a.throws(function () { t(false); }, TypeError, "false");
10 a.throws(function () { t({}); }, TypeError, "Plain Object");
11 a.throws(function () { t(function () {}); }, TypeError, "Function");
12 a(t(x = new String('raz')), x, "String object"); //jslint: ignore
14 a(t(x = { length: 1 }), x, "Array like");
15 a.throws(function () { t(); }, TypeError, "Undefined");
16 a.throws(function () { t(null); }, TypeError, "null");
18 x[iteratorSymbol] = function () {};
19 a(t(x), x, "Iterable");