Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
fix: build diff image with using "antialiasingTolerance" prop
Browse files Browse the repository at this point in the history
  • Loading branch information
DudaGod committed Jan 29, 2019
1 parent 2c672df commit 7ff6e2a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/state-processor/test-state-processor.js
Expand Up @@ -17,22 +17,23 @@ 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,
current: result.currImg.path,
diff: diffPath,
diffColor: this._diffColor,
tolerance: result.tolerance,
antialiasingTolerance,
...buildDiffOpts
})
});
Expand Down

0 comments on commit 7ff6e2a

Please sign in to comment.