From e80e1dab4d93c2deba11baae7ce0a118b7418293 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 17 Apr 2013 19:53:14 -0700 Subject: [PATCH] Add `lodash underscore` build tests for isType methods. Former-commit-id: 80898964d46abebb3acf1e5e3586f4df700cd85b --- test/test-build.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test-build.js b/test/test-build.js index 939f237af..f61d5e75e 100644 --- a/test/test-build.js +++ b/test/test-build.js @@ -961,6 +961,11 @@ strictEqual(actual, false, '_.isEqual should ignore `callback` and `thisArg`: ' + basename); + _.each(['isArray', 'isBoolean', 'isDate', 'isFunction', 'isNumber', 'isRegExp', 'isString'], function(methodName) { + var proto = global[methodName.slice(2)].prototype; + strictEqual(lodash[methodName](Object.create(proto)), false, '_.' + methodName + ' returns `false` for subclassed values: ' + basename); + }); + equal(lodash.max('abc'), -Infinity, '_.max should return `-Infinity` for strings: ' + basename); equal(lodash.min('abc'), Infinity, '_.min should return `Infinity` for strings: ' + basename);