]>
git.r.bdr.sh - rbdr/dotfiles/blob - atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate.js
bcc2ad3d0aa1c974594d9f55e0e64d65e52f8478
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");