added an isRegExp test

This commit is contained in:
Jeremy Ashkenas
2009-12-06 23:10:44 -05:00
parent 2875f3145d
commit 06c74e76f0

View File

@@ -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');