Ava: Image snapshots w/visual comparison

Created on 10 Oct 2017  路  4Comments  路  Source: avajs/ava

It'd be nice if the snapshots stored images as actual images instead of inline binary data.

Not sure if this is possible, I didn't see it documented anywhere.

It'd also be nice to add https://github.com/Huddle/Resemble.js built-in to do visual diffing with a threshold (which could be configured by ava config or test-specific).

Most helpful comment

@bokuweb cool! hmm yours checks for an exact match, I think I'm going to use @limonte approach at https://github.com/limonte/sweetalert2/blob/3c5b196fbf9bf3780c091a6e22a860228c9486ae/test/puppeteer/visual-tests.js#L167 probably, thank you. Currently using https://github.com/Huddle/Resemble.js and dislike that it requires canvas etc.

All 4 comments

Rather we might want to use https://github.com/gemini-testing/looks-same instead

@niftylettuce I have created ava + electron + visual regression test example.

I hope it will be helpful to you :)

@bokuweb cool! hmm yours checks for an exact match, I think I'm going to use @limonte approach at https://github.com/limonte/sweetalert2/blob/3c5b196fbf9bf3780c091a6e22a860228c9486ae/test/puppeteer/visual-tests.js#L167 probably, thank you. Currently using https://github.com/Huddle/Resemble.js and dislike that it requires canvas etc.

Would be cool if someone could submit a recipe for this: https://github.com/avajs/ava/tree/master/docs/recipes

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fleg picture fleg  路  3Comments

ehmicky picture ehmicky  路  4Comments

dlumma picture dlumma  路  4Comments

sindresorhus picture sindresorhus  路  4Comments

carpasse picture carpasse  路  3Comments