Sha256: 814cfa3929e90aee8dda47888c0d51cb6509ea3db36afe88c93d4be84136c5c4
Contents?: true
Size: 871 Bytes
Versions: 3
Compression:
Stored size: 871 Bytes
Contents
describe("toContain", function() { it("delegates to j$.matchersUtil.contains", function() { var util = { contains: jasmine.createSpy('delegated-contains').and.returnValue(true) }, matcher = j$.matchers.toContain(util); result = matcher.compare("ABC", "B"); expect(util.contains).toHaveBeenCalledWith("ABC", "B", []); expect(result.pass).toBe(true); }); it("delegates to j$.matchersUtil.contains, passing in equality testers if present", function() { var util = { contains: jasmine.createSpy('delegated-contains').and.returnValue(true) }, customEqualityTesters = ['a', 'b'], matcher = j$.matchers.toContain(util, customEqualityTesters); result = matcher.compare("ABC", "B"); expect(util.contains).toHaveBeenCalledWith("ABC", "B", ['a', 'b']); expect(result.pass).toBe(true); }); });
Version data entries
3 entries across 3 versions & 1 rubygems