Sha256: c7d9bb93c03602d3e9adcc0e8faed7a9e6126631b302e807a46538236609a4e9

Contents?: true

Size: 1.09 KB

Versions: 9

Compression:

Stored size: 1.09 KB

Contents

describe("Anything", function() {
  it("matches a string", function() {
    var anything = new j$.Anything();

    expect(anything.asymmetricMatch('foo')).toBe(true);
  });

  it("matches a number", function() {
    var anything = new j$.Anything();

    expect(anything.asymmetricMatch(42)).toBe(true);
  });

  it("matches an object", function() {
    var anything = new j$.Anything();

    expect(anything.asymmetricMatch({ foo: 'bar' })).toBe(true);
  });

  it("matches an array", function() {
    var anything = new j$.Anything();

    expect(anything.asymmetricMatch([1,2,3])).toBe(true);
  });

  it("doesn't match undefined", function() {
    var anything = new j$.Anything();

    expect(anything.asymmetricMatch()).toBe(false);
    expect(anything.asymmetricMatch(undefined)).toBe(false);
  });

  it("doesn't match null", function() {
    var anything = new j$.Anything();

    expect(anything.asymmetricMatch(null)).toBe(false);
  });

  it("jasmineToString's itself", function() {
    var anything = new j$.Anything();

    expect(anything.jasmineToString()).toEqual("<jasmine.anything>");
  });
});

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
tdiary-5.0.2 vendor/bundle/gems/jasmine-core-2.4.1/lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js
tdiary-5.0.1 vendor/bundle/gems/jasmine-core-2.4.1/lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js
jasmine-core-2.4.1 ./lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js
jasmine-core-2.4.0 ./lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js
jasmine-core-2.3.4 ./lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js
jasmine-core-2.3.3 ./lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js
jasmine-core-2.3.2 ./lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js
jasmine-core-2.3.0 ./lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js
jasmine-core-2.2.0 ./lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js