Sha256: 704e56dca2f08b23a760096f2094f78e288058f0995345d40d2754542e74308e

Contents?: true

Size: 946 Bytes

Versions: 17

Compression:

Stored size: 946 Bytes

Contents

describe("toBeNegativeInfinity", function() {
  it("fails for anything that isn't -Infinity", function() {
    var matcher = jasmineUnderTest.matchers.toBeNegativeInfinity(),
      result;

    result = matcher.compare(1);
    expect(result.pass).toBe(false);

    result = matcher.compare(Number.NaN);
    expect(result.pass).toBe(false);

    result = matcher.compare(null);
    expect(result.pass).toBe(false);
  });

  it("has a custom message on failure", function() {
    var matcher = jasmineUnderTest.matchers.toBeNegativeInfinity(),
      result = matcher.compare(0);

    expect(result.message()).toEqual("Expected 0 not to be -Infinity.")
  });

  it("succeeds for -Infinity", function() {
    var matcher = jasmineUnderTest.matchers.toBeNegativeInfinity(),
      result = matcher.compare(Number.NEGATIVE_INFINITY);

    expect(result.pass).toBe(true);
    expect(result.message).toEqual("Expected actual to be -Infinity.")
  });

});

Version data entries

17 entries across 16 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/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-2.99.1 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-3.0.0 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-2.99.0 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-2.9.1 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-2.9.0 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
tdiary-5.0.7 vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
tdiary-5.0.6 vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-2.8.0 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-2.7.0 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
tdiary-5.0.5 vendor/bundle/gems/jasmine-core-2.6.4/lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
tdiary-5.0.5 vendor/bundle/gems/jasmine-core-2.6.3/lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-2.6.4 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-2.6.3 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-2.6.2 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-2.6.1 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js
jasmine-core-2.6.0 ./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js