Skip to content
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

Merged
merged 4 commits into from
Feb 28, 2019
Merged

Conversation

DudaGod
Copy link
Member

@DudaGod DudaGod commented Feb 9, 2019

No description provided.

@DudaGod DudaGod force-pushed the dd.compare_by_bounds branch from c7a7585 to 87807ab Compare February 9, 2019 19:18
@DudaGod DudaGod requested review from rostik404 and sipayRT February 9, 2019 20:03
.travis.yml Show resolved Hide resolved
@@ -120,36 +118,40 @@ const getToleranceFromOpts = (opts) => {
const prepareOpts = (opts) => {
opts.tolerance = getToleranceFromOpts(opts);

_.defaults(opts, {
return _.defaults(opts, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

lib/diff-area.js Outdated Show resolved Hide resolved
lib/png/png.js Show resolved Hide resolved
lib/png/png.js Show resolved Hide resolved
lib/utils.js Show resolved Hide resolved
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);
Copy link
Member

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert.isTrue

test/test.js Show resolved Hide resolved
test/utils.js Outdated
formatImages('img1', 'img2');

assert.calledOnce(validators.validateImages);
assert.calledWith(validators.validateImages, 'img1', 'img2');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ты же добавил calledOnceWith - юзни его

@DudaGod DudaGod force-pushed the dd.compare_by_bounds branch from aad3248 to ed0984d Compare February 28, 2019 05:45
@DudaGod DudaGod merged commit 8163ad8 into master Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants