mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Tests: Second attempt to find fitting tolerance for failing gradient SVG export.
This commit is contained in:
parent
6f4738f8b2
commit
eceb133686
2 changed files with 2 additions and 2 deletions
|
@ -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),
|
||||
|
|
|
@ -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
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue