Replaced jasmine testing framework by mocha, expect.js and sinon
as discussed in #319
This commit is contained in:
@@ -4,23 +4,23 @@ goog.provide('ol.test.math');
|
||||
describe('ol.math.cosh', function() {
|
||||
|
||||
it('returns the correct value at -Infinity', function() {
|
||||
expect(ol.math.cosh(-Infinity)).toEqual(Infinity);
|
||||
expect(ol.math.cosh(-Infinity)).to.eql(Infinity);
|
||||
});
|
||||
|
||||
it('returns the correct value at -1', function() {
|
||||
expect(ol.math.cosh(-1)).toRoughlyEqual(1.5430806348152437, 1e-9);
|
||||
expect(ol.math.cosh(-1)).to.roughlyEqual(1.5430806348152437, 1e-9);
|
||||
});
|
||||
|
||||
it('returns the correct value at 0', function() {
|
||||
expect(ol.math.cosh(0)).toEqual(1);
|
||||
expect(ol.math.cosh(0)).to.eql(1);
|
||||
});
|
||||
|
||||
it('returns the correct value at 1', function() {
|
||||
expect(ol.math.cosh(1)).toRoughlyEqual(1.5430806348152437, 1e-9);
|
||||
expect(ol.math.cosh(1)).to.roughlyEqual(1.5430806348152437, 1e-9);
|
||||
});
|
||||
|
||||
it('returns the correct value at Infinity', function() {
|
||||
expect(ol.math.cosh(Infinity)).toEqual(Infinity);
|
||||
expect(ol.math.cosh(Infinity)).to.eql(Infinity);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -29,15 +29,15 @@ describe('ol.math.cosh', function() {
|
||||
describe('ol.math.coth', function() {
|
||||
|
||||
it('returns the correct value at -1', function() {
|
||||
expect(ol.math.coth(-1)).toRoughlyEqual(-1.3130352854993312, 1e-9);
|
||||
expect(ol.math.coth(-1)).to.roughlyEqual(-1.3130352854993312, 1e-9);
|
||||
});
|
||||
|
||||
it('returns the correct value at 1', function() {
|
||||
expect(ol.math.coth(1)).toRoughlyEqual(1.3130352854993312, 1e-9);
|
||||
expect(ol.math.coth(1)).to.roughlyEqual(1.3130352854993312, 1e-9);
|
||||
});
|
||||
|
||||
it('returns the correct value at Infinity', function() {
|
||||
expect(ol.math.coth(Infinity)).toEqual(1);
|
||||
expect(ol.math.coth(Infinity)).to.eql(1);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -46,19 +46,19 @@ describe('ol.math.coth', function() {
|
||||
describe('ol.math.csch', function() {
|
||||
|
||||
it('returns the correct value at -Infinity', function() {
|
||||
expect(ol.math.csch(-Infinity)).toEqual(0);
|
||||
expect(ol.math.csch(-Infinity)).to.eql(0);
|
||||
});
|
||||
|
||||
it('returns the correct value at -1', function() {
|
||||
expect(ol.math.csch(-1)).toRoughlyEqual(-0.85091812823932156, 1e-9);
|
||||
expect(ol.math.csch(-1)).to.roughlyEqual(-0.85091812823932156, 1e-9);
|
||||
});
|
||||
|
||||
it('returns the correct value at 1', function() {
|
||||
expect(ol.math.csch(1)).toRoughlyEqual(0.85091812823932156, 1e-9);
|
||||
expect(ol.math.csch(1)).to.roughlyEqual(0.85091812823932156, 1e-9);
|
||||
});
|
||||
|
||||
it('returns the correct value at Infinity', function() {
|
||||
expect(ol.math.csch(Infinity)).toEqual(0);
|
||||
expect(ol.math.csch(Infinity)).to.eql(0);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -67,23 +67,23 @@ describe('ol.math.csch', function() {
|
||||
describe('ol.math.sech', function() {
|
||||
|
||||
it('returns the correct value at -Infinity', function() {
|
||||
expect(ol.math.sech(-Infinity)).toEqual(0);
|
||||
expect(ol.math.sech(-Infinity)).to.eql(0);
|
||||
});
|
||||
|
||||
it('returns the correct value at -1', function() {
|
||||
expect(ol.math.sech(-1)).toRoughlyEqual(0.64805427366388535, 1e-9);
|
||||
expect(ol.math.sech(-1)).to.roughlyEqual(0.64805427366388535, 1e-9);
|
||||
});
|
||||
|
||||
it('returns the correct value at 0', function() {
|
||||
expect(ol.math.sech(0)).toEqual(1);
|
||||
expect(ol.math.sech(0)).to.eql(1);
|
||||
});
|
||||
|
||||
it('returns the correct value at 1', function() {
|
||||
expect(ol.math.sech(1)).toRoughlyEqual(0.64805427366388535, 1e-9);
|
||||
expect(ol.math.sech(1)).to.roughlyEqual(0.64805427366388535, 1e-9);
|
||||
});
|
||||
|
||||
it('returns the correct value at Infinity', function() {
|
||||
expect(ol.math.sech(Infinity)).toEqual(0);
|
||||
expect(ol.math.sech(Infinity)).to.eql(0);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -92,23 +92,23 @@ describe('ol.math.sech', function() {
|
||||
describe('ol.math.sinh', function() {
|
||||
|
||||
it('returns the correct value at -Infinity', function() {
|
||||
expect(ol.math.sinh(-Infinity)).toEqual(-Infinity);
|
||||
expect(ol.math.sinh(-Infinity)).to.eql(-Infinity);
|
||||
});
|
||||
|
||||
it('returns the correct value at -1', function() {
|
||||
expect(ol.math.sinh(-1)).toRoughlyEqual(-1.1752011936438014, 1e-9);
|
||||
expect(ol.math.sinh(-1)).to.roughlyEqual(-1.1752011936438014, 1e-9);
|
||||
});
|
||||
|
||||
it('returns the correct value at 0', function() {
|
||||
expect(ol.math.sinh(0)).toEqual(0);
|
||||
expect(ol.math.sinh(0)).to.eql(0);
|
||||
});
|
||||
|
||||
it('returns the correct value at 1', function() {
|
||||
expect(ol.math.sinh(1)).toRoughlyEqual(1.1752011936438014, 1e-9);
|
||||
expect(ol.math.sinh(1)).to.roughlyEqual(1.1752011936438014, 1e-9);
|
||||
});
|
||||
|
||||
it('returns the correct value at Infinity', function() {
|
||||
expect(ol.math.cosh(Infinity)).toEqual(Infinity);
|
||||
expect(ol.math.cosh(Infinity)).to.eql(Infinity);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -117,15 +117,15 @@ describe('ol.math.sinh', function() {
|
||||
describe('ol.math.tanh', function() {
|
||||
|
||||
it('returns the correct value at -1', function() {
|
||||
expect(ol.math.tanh(-1)).toRoughlyEqual(-0.76159415595576485, 1e-9);
|
||||
expect(ol.math.tanh(-1)).to.roughlyEqual(-0.76159415595576485, 1e-9);
|
||||
});
|
||||
|
||||
it('returns the correct value at 0', function() {
|
||||
expect(ol.math.tanh(0)).toEqual(0);
|
||||
expect(ol.math.tanh(0)).to.eql(0);
|
||||
});
|
||||
|
||||
it('returns the correct value at 1', function() {
|
||||
expect(ol.math.tanh(1)).toRoughlyEqual(0.76159415595576485, 1e-9);
|
||||
expect(ol.math.tanh(1)).to.roughlyEqual(0.76159415595576485, 1e-9);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user