From 1a43f36e2395c77005fd14fafd43808548b111f2 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Sat, 6 Nov 2010 23:50:04 -0700 Subject: Add isDate method + fix old code --- test/AngularSpec.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/AngularSpec.js') diff --git a/test/AngularSpec.js b/test/AngularSpec.js index b00aa631..23f06887 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -328,3 +328,16 @@ describe('angular service', function() { expect(result.third).toBeTruthy(); }); }); + +describe('isDate', function() { + it('should return true for Date object', function() { + expect(isDate(new Date())).toBe(true); + }); + + it('should return false for non Date objects', function() { + expect(isDate([])).toBe(false); + expect(isDate('')).toBe(false); + expect(isDate(23)).toBe(false); + expect(isDate({})).toBe(false); + }); +}); -- cgit v1.2.3