-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ability to compare images by regions #51
Conversation
c7a7585
to
87807ab
Compare
@@ -120,36 +118,40 @@ const getToleranceFromOpts = (opts) => { | |||
const prepareOpts = (opts) => { | |||
opts.tolerance = getToleranceFromOpts(opts); | |||
|
|||
_.defaults(opts, { | |||
return _.defaults(opts, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
test/test.js
Outdated
{source: getImage('bounding-box-diff-1.png'), boundingBox: {left: 5, top: 5, right: 5, bottom: 6}}, | ||
(error, {equal}) => { | ||
assert.equal(error, null); | ||
assert.equal(equal, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.isFalse?
test/test.js
Outdated
{source: getImage('bounding-box-diff-2.png'), boundingBox: {left: 5, top: 5, right: 8, bottom: 8}}, | ||
(error, {equal}) => { | ||
assert.equal(error, null); | ||
assert.equal(equal, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.isTrue
test/utils.js
Outdated
formatImages('img1', 'img2'); | ||
|
||
assert.calledOnce(validators.validateImages); | ||
assert.calledWith(validators.validateImages, 'img1', 'img2'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ты же добавил calledOnceWith
- юзни его
aad3248
to
ed0984d
Compare
No description provided.