Sha256: c3e59c850b089a844e73c97062ae23a1d6f6ec76b0c9bde1cef80b889c03150e
Contents?: true
Size: 1.24 KB
Versions: 6
Compression:
Stored size: 1.24 KB
Contents
describe("ArrayContaining", function() { it("matches any actual to an empty array", function() { var containing = new jasmineUnderTest.ArrayContaining([]); expect(containing.asymmetricMatch("foo")).toBe(true); }); it("does not work when not passed an array", function() { var containing = new jasmineUnderTest.ArrayContaining("foo"); expect(function() { containing.asymmetricMatch([]); }).toThrowError(/not 'foo'/); }); it("matches when the item is in the actual", function() { var containing = new jasmineUnderTest.ArrayContaining(["foo"]); expect(containing.asymmetricMatch(["foo"])).toBe(true); }); it("matches when additional items are in the actual", function() { var containing = new jasmineUnderTest.ArrayContaining(["foo"]); expect(containing.asymmetricMatch(["foo", "bar"])).toBe(true); }); it("does not match when the item is not in the actual", function() { var containing = new jasmineUnderTest.ArrayContaining(["foo"]); expect(containing.asymmetricMatch(["bar"])).toBe(false); }); it("jasmineToStrings itself", function() { var containing = new jasmineUnderTest.ArrayContaining([]); expect(containing.jasmineToString()).toMatch("<jasmine.arrayContaining"); }); });
Version data entries
6 entries across 5 versions & 2 rubygems