From 06c74e76f085adf61a8a3690d3e84c8967c4d201 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Sun, 6 Dec 2009 23:10:44 -0500 Subject: [PATCH] added an isRegExp test --- test/objects.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/objects.js b/test/objects.js index a6b63e0d4..97556747c 100644 --- a/test/objects.js +++ b/test/objects.js @@ -83,6 +83,11 @@ $(document).ready(function() { ok(_.isDate(new Date()), 'but dates are'); }); + test("objects: isRegExp", function() { + ok(!_.isRegExp(_.identity), 'functions are not RegExps'); + ok(_.isRegExp(/identity/), 'but RegExps are'); + }); + test("objects: isNaN", function() { ok(!_.isNaN(undefined), 'undefined is not NaN'); ok(!_.isNaN(null), 'null is not NaN');