diff --git a/test/helpers.js b/test/helpers.js index f38c165e..fb58c2f4 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -204,7 +204,7 @@ var comparePixels = function(actual, expected, message, options) { .onComplete(function(data) { result = data; }); // Compare with tolerance in percentage... var tolerance = (options.tolerance || 1e-4) * 100, - fixed = ((1 / tolerance) + '').length - 1, + fixed = tolerance < 1 ? ((1 / tolerance) + '').length - 1 : 0, identical = result ? 100 - result.misMatchPercentage : 0, reached = identical.toFixed(fixed), hundred = (100).toFixed(fixed), diff --git a/test/tests/SvgExport.js b/test/tests/SvgExport.js index 823db4dc..773438f7 100644 --- a/test/tests/SvgExport.js +++ b/test/tests/SvgExport.js @@ -188,7 +188,7 @@ if (!isNode) { var svg = project.exportSVG({ bounds: 'content', asString: true }); compareSVG(assert.async(), svg, project.activeLayer, null, { - tolerance: 1e-1 + tolerance: 1e-2 }); }); }