3 var iteratorSymbol = require('es6-symbol').iterator
4 , Iterator = require('../');
6 module.exports = function (t, a) {
8 a.throws(function () { t(); }, TypeError, "Null");
9 a.throws(function () { t({}); }, TypeError, "Plain object");
10 a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
12 iterator[iteratorSymbol] = function () { return new Iterator([]); };
13 a(t(iterator) instanceof Iterator, true, "Iterator");
14 a(String(t([])), '[object Array Iterator]', " Array");
15 a(String(t('foo')), '[object String Iterator]', "String");