Sha256: 5d3c8d8f99670e3cd616de17e990be7306d3cc3b67e04e4dfc0cafb3f83f364c
Contents?: true
Size: 875 Bytes
Versions: 23
Compression:
Stored size: 875 Bytes
Contents
describe("MatchersSpec - HTML Dependent", function () { var env, spec; beforeEach(function() { env = new jasmineUnderTest.Env(); var suite = env.describe("suite", function() { spec = env.it("spec", function() { }); }); spyOn(spec, 'addExpectationResult'); addMatchers({ toPass: function() { return lastResult().passed; }, toFail: function() { return !lastResult().passed; } }); }); function match(value) { return spec.expect(value); } function lastResult() { return spec.addExpectationResult.mostRecentCall.args[1]; } xit("toEqual with DOM nodes", function() { var nodeA = document.createElement('div'); var nodeB = document.createElement('div'); expect((match(nodeA).toEqual(nodeA))).toPass(); expect((match(nodeA).toEqual(nodeB))).toFail(); }); });
Version data entries
23 entries across 20 versions & 2 rubygems