]> git.r.bdr.sh - rbdr/dotfiles/blob
2f3e31b442ebcbbaf9e54d103d12b79ecfc9a6c9
[rbdr/dotfiles] /
1 'use strict';
2
3 module.exports = function (t, a) {
4 var x;
5 a.throws(function () { t(0); }, TypeError, "0");
6 a.throws(function () { t(false); }, TypeError, "false");
7 a.throws(function () { t(''); }, TypeError, "String");
8 a.throws(function () { t({}); }, TypeError, "Plain Object");
9 a.throws(function () { t(function () {}); }, TypeError, "Function");
10 a(t(x = new String('raz')), x, "String object"); //jslint: ignore
11
12 a(t(x = { length: 1 }), x, "Array like");
13 a.throws(function () { t(); }, TypeError, "Undefined");
14 a.throws(function () { t(null); }, TypeError, "null");
15 };