Skip to content

Commit

Permalink
fix: add errorThreshold in global options (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
d0whc3r committed Feb 10, 2021
1 parent 5b1531c commit 4535a50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ function compareSnapshotCommand(defaultScreenshotOptions) {
if (typeof params === 'number') {
errorThreshold = params;
} else if (typeof params === 'object') {
errorThreshold = params.errorThreshold || 0.0;
errorThreshold =
params.errorThreshold ||
(defaultScreenshotOptions &&
defaultScreenshotOptions.errorThreshold) ||
0.0;
screenshotOptions = Object.assign({}, defaultScreenshotOptions, params);
}
let title = 'actual';
Expand Down

0 comments on commit 4535a50

Please sign in to comment.