diff --git a/lib/state-processor/test-state-processor.js b/lib/state-processor/test-state-processor.js index 3a02a6ac8..54b2fa193 100644 --- a/lib/state-processor/test-state-processor.js +++ b/lib/state-processor/test-state-processor.js @@ -17,15 +17,15 @@ module.exports = class TestStateProcessor extends StateProcessor { return super.exec(state, browserSession, page) .then((result) => { if (!result.equal) { - const {buildDiffOpts} = browserSession.browser.config; - result = this._attachDiffBuilder(result, buildDiffOpts); + const {buildDiffOpts, antialiasingTolerance} = browserSession.browser.config; + result = this._attachDiffBuilder(result, {buildDiffOpts, antialiasingTolerance}); } emit(Events.TEST_RESULT, result); }); } - _attachDiffBuilder(result, buildDiffOpts) { + _attachDiffBuilder(result, {buildDiffOpts, antialiasingTolerance}) { return _.extend(result, { saveDiffTo: (diffPath) => Image.buildDiff({ reference: result.refImg.path, @@ -33,6 +33,7 @@ module.exports = class TestStateProcessor extends StateProcessor { diff: diffPath, diffColor: this._diffColor, tolerance: result.tolerance, + antialiasingTolerance, ...buildDiffOpts }) });