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

Ability to choose alternative comparison library #11

Closed
phawxby opened this issue Aug 30, 2017 · 4 comments
Closed

Ability to choose alternative comparison library #11

phawxby opened this issue Aug 30, 2017 · 4 comments

Comments

@phawxby
Copy link
Contributor

phawxby commented Aug 30, 2017

Looking at github commits it appears blink-diff is pretty much dead, no activity in over a year and this issue suggests the author has left Yahoo.

Being able to pick a more modern comparison library while retaining blink-diff as the default would probably make sense.

Resemble-js is an option but again, there hasn't been much activity in over a year.

So I'm thinking pixelmatch would make sense, although it has less features than the other libraries it has an active community and by far the most popular image comparison library on npm.

Thoughts?

@anescobar1991
Copy link
Member

That is a very good point, and one that I have already spent some time thinking about.

However the blocker I have with most other libraries is that they need to be able to run synchronously and they should not require any external dependencies like canvas.

I would love to be able to use a better maintained library but these are the constraints that currently hold me to blink-diff. For the time being though I am quite limited on time but feel free to explore this option and open a PR and/or keep discussing here until I can find some time to implement a solution!

@anescobar1991
Copy link
Member

Solved by #19

anescobar1991 added a commit that referenced this issue Nov 7, 2017
…-update to master

* commit 'abb4d88157330be376734616a1d4ad57d966a675':
  docs(readme): update for new custom snapshots dir option
@cdeutsch
Copy link

cdeutsch commented Nov 8, 2017

After a week of using v2 with pixelmatch, I like blink-diff better.

I've been getting a lot of inconsistent results with pixelmatch. I often run with 0 as the threshold, and it will pickup tiny diffs in one run but not the next.

A side note, it doesn't look like pixelmatch is in active development either (maybe neither really need to be). Last significant commit to pixelmatch was over a year ago.

I like the original idea of picking a comparison library versus just switching wholesale to pixelmatch, but obviously that's a lot more work and complicates things.

For now I'll just go back to v1.0.1 which was meeting my needs so far, just figured I'd share my experience.

Love this library by the way! 👍

@phawxby
Copy link
Contributor Author

phawxby commented Nov 9, 2017

@cdeutsch do you know of any others comparably fast and in active development?

Also are you able to provide any test cases? The only similar cases I have seen relate to slight font rendering differences between Puppeteer on Windows verses our Linux based CI environment. For that reason I implemented failureThreshold and failureThresholdType to allow for a few percentage points of difference between snapshots.

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

No branches or pull requests

3 participants