Sha256: f0935ca7eb23a4238c3e5a8cbc25ac609378a77e2ce105f83459109e9777cca9
Contents?: true
Size: 942 Bytes
Versions: 17
Compression:
Stored size: 942 Bytes
Contents
describe("toBePositiveInfinity", function() { it("fails for anything that isn't Infinity", function() { var matcher = jasmineUnderTest.matchers.toBePositiveInfinity(), result; result = matcher.compare(1); expect(result.pass).toBe(false); result = matcher.compare(Number.NaN); expect(result.pass).toBe(false); result = matcher.compare(null); expect(result.pass).toBe(false); }); it("has a custom message on failure", function() { var matcher = jasmineUnderTest.matchers.toBePositiveInfinity(), result = matcher.compare(0); expect(result.message()).toEqual("Expected 0 not to be Infinity.") }); it("succeeds for Infinity", function() { var matcher = jasmineUnderTest.matchers.toBePositiveInfinity(), result = matcher.compare(Number.POSITIVE_INFINITY); expect(result.pass).toBe(true); expect(result.message).toEqual("Expected actual to be Infinity.") }); });
Version data entries
17 entries across 16 versions & 2 rubygems