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

Version Path
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-2.99.1 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-3.0.0 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-2.99.0 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-2.9.1 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-2.9.0 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
tdiary-5.0.7 vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/html/MatchersHtmlSpec.js
tdiary-5.0.6 vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-2.8.0 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-2.7.0 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/jasmine-core-2.5.2/lib/jasmine-core/spec/html/MatchersHtmlSpec.js
tdiary-5.0.5 vendor/bundle/gems/jasmine-core-2.5.2/lib/jasmine-core/spec/html/MatchersHtmlSpec.js
tdiary-5.0.5 vendor/bundle/gems/jasmine-core-2.6.3/lib/jasmine-core/spec/html/MatchersHtmlSpec.js
tdiary-5.0.5 vendor/bundle/gems/jasmine-core-2.6.4/lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-2.6.4 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-2.6.3 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-2.6.2 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-2.6.1 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
jasmine-core-2.6.0 ./lib/jasmine-core/spec/html/MatchersHtmlSpec.js
tdiary-5.0.4 vendor/bundle/gems/jasmine-core-2.5.2/lib/jasmine-core/spec/html/MatchersHtmlSpec.js