Sha256: 41907ed94acb1205bd65d83cccc431d4c9ec7aa9afe9340a1c8372b2ee187699

Contents?: true

Size: 818 Bytes

Versions: 58

Compression:

Stored size: 818 Bytes

Contents

describe("toEqual", function() {
  it("delegates to equals function", function() {
    var util = {
        equals: jasmine.createSpy('delegated-equals').and.returnValue(true)
      },
      matcher = j$.matchers.toEqual(util),
      result;

    result = matcher.compare(1, 1);

    expect(util.equals).toHaveBeenCalledWith(1, 1, []);
    expect(result.pass).toBe(true);
  });

  it("delegates custom equality testers, if present", function() {
    var util = {
        equals: jasmine.createSpy('delegated-equals').and.returnValue(true)
      },
      customEqualityTesters = ['a', 'b'],
      matcher = j$.matchers.toEqual(util, customEqualityTesters),
      result;

    result = matcher.compare(1, 1);

    expect(util.equals).toHaveBeenCalledWith(1, 1, ['a', 'b']);
    expect(result.pass).toBe(true);
  });
});

Version data entries

58 entries across 58 versions & 4 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/bootstrap-tagsinput/lib/jasmine/spec/core/matchers/toEqualSpec.js
tdiary-5.0.2 vendor/bundle/gems/jasmine-core-2.4.1/lib/jasmine-core/spec/core/matchers/toEqualSpec.js
tdiary-5.0.1 vendor/bundle/gems/jasmine-core-2.4.1/lib/jasmine-core/spec/core/matchers/toEqualSpec.js
jasmine-core-2.4.1 ./lib/jasmine-core/spec/core/matchers/toEqualSpec.js
jasmine-core-2.4.0 ./lib/jasmine-core/spec/core/matchers/toEqualSpec.js
upjs-rails-0.11.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.10.5 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.10.4 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.10.3 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.10.2 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.10.1 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.10.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.9.1 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.9.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.8.2 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.8.1 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.8.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.7.8 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.7.7 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js
upjs-rails-0.7.6 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js