From a19ebaca1ca5eb13d0065e4cb50eececb2cdef15 Mon Sep 17 00:00:00 2001 From: jos Date: Wed, 6 Jun 2018 10:21:54 +0200 Subject: [PATCH] More fixes for unite tests on IE11 and Edge (part IV) --- browser-test-config/browserstack-karma.js | 2 +- test/function/trigonometry/sinh.test.js | 10 ++++++++-- test/type/unit/physicalConstants.test.js | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/browser-test-config/browserstack-karma.js b/browser-test-config/browserstack-karma.js index 84e07fc25..847c2f011 100644 --- a/browser-test-config/browserstack-karma.js +++ b/browser-test-config/browserstack-karma.js @@ -59,7 +59,7 @@ module.exports = function(config) { browser: 'IE', browser_version: '11', os: 'Windows', - os_version: '7' + os_version: '10' }, bs_edge: { base: 'BrowserStack', diff --git a/test/function/trigonometry/sinh.test.js b/test/function/trigonometry/sinh.test.js index 4f33e3100..8baadb411 100644 --- a/test/function/trigonometry/sinh.test.js +++ b/test/function/trigonometry/sinh.test.js @@ -32,10 +32,16 @@ describe('sinh', function() { // skip this test on node v0.10 and v0.12, which have a numerical issue it('should return the sinh of very small numbers (avoid returning zero)', function() { - // If sinh returns 0, that is bad, so we are using assert.equal, not approx.equal + // If sinh returns 0, that is bad, so we are using assert, not approx.equal assert(sinh(-1e-10) !== 0); - assert(sinh(-1e-50) !== 0); assert(Math.abs(sinh(-1e-10) - -1e-10) < EPSILON); + }); + + // FIXME: this test doesn't work on IE11, find a solution for that + it('should return the sinh of very large numbers (avoid returning zero)', function() { + // If sinh returns 0, that is bad, so we are using assert.equal, not approx.equal + console.log('process.version=', process.version) + assert(sinh(1e-50) !== 0); assert(Math.abs(sinh(1e-50) - 1e-50) < EPSILON); }); } diff --git a/test/type/unit/physicalConstants.test.js b/test/type/unit/physicalConstants.test.js index 5ed9c9e6d..bfff30239 100644 --- a/test/type/unit/physicalConstants.test.js +++ b/test/type/unit/physicalConstants.test.js @@ -44,7 +44,7 @@ describe('physical constants', function() { approx.equal(math.efimovFactor, 22.7); // Physico-chemical constants - assert.equal(math.atomicMass.toString(), '1.6605389217299995e-27 kg'); // round-off error + assert.equal(math.atomicMass.format({precision: 14}), '1.66053892173e-27 kg'); // round-off error assert.equal(math.avogadro.toString(), '6.0221412927e+23 mol^-1'); assert.equal(math.boltzmann.toString(), '1.380648813e-23 J / K'); assert.equal(math.faraday.toString(), '96485.336521 C / mol');