aboutsummaryrefslogtreecommitdiffstats
path: root/test/AngularSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2012-02-23 13:57:28 -0800
committerMisko Hevery2012-02-23 13:57:28 -0800
commitffa84418862a9f768ce5b9b681916438f14a0d79 (patch)
tree2eb74fb2fc9879743ee6dd6526c78e089cd18b96 /test/AngularSpec.js
parent5d8528cc2e1092cdd9533f8c9f0d716200e88b7e (diff)
downloadangular.js-ffa84418862a9f768ce5b9b681916438f14a0d79.tar.bz2
bug(equals): incorect comparison of dates
Diffstat (limited to 'test/AngularSpec.js')
-rw-r--r--test/AngularSpec.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/AngularSpec.js b/test/AngularSpec.js
index 10f5fd2a..9d7bda94 100644
--- a/test/AngularSpec.js
+++ b/test/AngularSpec.js
@@ -168,6 +168,13 @@ describe('angular', function() {
expect(equals(window, window.parent)).toBe(false);
expect(equals(window, undefined)).toBe(false);
});
+
+ it('should compare dates', function() {
+ expect(equals(new Date(0), new Date(0))).toBe(true);
+ expect(equals(new Date(0), new Date(1))).toBe(false);
+ expect(equals(new Date(0), 0)).toBe(false);
+ expect(equals(0, new Date(0))).toBe(false);
+ });
});
describe('size', function() {