From cddfba167698bd522508bdab04714ee586aa8d4b Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Tue, 15 Dec 2015 19:33:38 -0500 Subject: [PATCH] Better test --- test/scale.logarithmic.tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/scale.logarithmic.tests.js b/test/scale.logarithmic.tests.js index c462564a9..1f05388c6 100644 --- a/test/scale.logarithmic.tests.js +++ b/test/scale.logarithmic.tests.js @@ -528,7 +528,7 @@ describe('Logarithmic Scale tests', function() { expect(verticalScale.getPixelForValue(80, 0, 0)).toBe(5); // top + paddingTop expect(verticalScale.getPixelForValue(1, 0, 0)).toBe(105); // bottom - paddingBottom - expect(verticalScale.getPixelForValue(10, 0, 0)).toBe(52.45387728193468); // halfway + expect(verticalScale.getPixelForValue(10, 0, 0)).toBeCloseTo(52.4, 1e-4); // halfway var horizontalConfig = Chart.helpers.clone(config); horizontalConfig.position = 'bottom'; @@ -555,6 +555,6 @@ describe('Logarithmic Scale tests', function() { expect(horizontalScale.getPixelForValue(80, 0, 0)).toBe(105); // right - paddingRight expect(horizontalScale.getPixelForValue(1, 0, 0)).toBe(5); // left + paddingLeft - expect(horizontalScale.getPixelForValue(10, 0, 0)).toBe(57.54612271806532); // halfway + expect(horizontalScale.getPixelForValue(10, 0, 0)).toBeCloseTo(57.5, 1e-4); // halfway }); }); \ No newline at end of file -- 2.47.2