From ce2161ca32f829cd7c403fe28a98ad774bc7f5b8 Mon Sep 17 00:00:00 2001 From: Tobias Schweizer Date: Thu, 25 Jun 2020 09:41:39 +0200 Subject: [PATCH] Add additional test for equals matcher --- spec/core/matchers/matchersUtilSpec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/core/matchers/matchersUtilSpec.js b/spec/core/matchers/matchersUtilSpec.js index 4894fefa..81874302 100644 --- a/spec/core/matchers/matchersUtilSpec.js +++ b/spec/core/matchers/matchersUtilSpec.js @@ -109,6 +109,11 @@ describe("matchersUtil", function() { expect(matchersUtil.equals(123, 456)).toBe(false); }); + it("fails for a Number and a String that have equivalent values", function() { + var matchersUtil = new jasmineUnderTest.MatchersUtil(); + expect(matchersUtil.equals(123, "123")).toBe(false); + }); + it("passes for Dates that are equivalent", function() { var matchersUtil = new jasmineUnderTest.MatchersUtil(); expect(matchersUtil.equals(new Date("Jan 1, 1970"), new Date("Jan 1, 1970"))).toBe(true);