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

Image snapshots do not match "Expected image to be the same size as the snapshot.." #76

Closed
test-pilott opened this issue Apr 5, 2019 · 5 comments

Comments

@test-pilott
Copy link

First of all, thanks for this awesome html reporter!

I get this issue when the image snapshot fails for a different error and this doesn't get picked up by the matcher in jest-stare so the snapshot diff is not copied and rendered.
Error: Expected image to be the same size as the snapshot (2370x6290), but was different (2370x6330).

Relevant code line:

public static DIFF_INDICATOR: string = "different from snapshot";

It just needs to additionally match against Expected image to be the same size as the snapshot.

Thanks.

@test-pilott test-pilott changed the title Image snapshots do not match "Error: Expected image to be the same size as the snapshot (2370x6290), but was different (2370x6330)." Image snapshots do not match "Error: Expected image to be the same size as the snapshot.." Apr 5, 2019
@test-pilott test-pilott changed the title Image snapshots do not match "Error: Expected image to be the same size as the snapshot.." Image snapshots do not match "Expected image to be the same size as the snapshot.." Apr 5, 2019
@test-pilott
Copy link
Author

Here are the two errors different error messages from jest-image-snapshot https://github.com/americanexpress/jest-image-snapshot/blob/48bc2e4b0a980c0a68a7896612ae9fd1dfd4a644/src/index.js#L63

@dkelosky
Copy link
Owner

dkelosky commented Apr 5, 2019

thanks @test-pilott - I've never actually use the image diff. Also, @mnikkane was kind enough to open a PR for this capability in the first place.

I can try to look at it, but I'll be greatly delayed (weeks) before I could look at fixing this. Alternatively, you can open a PR for this and beat me to it 😄

@test-pilott
Copy link
Author

@dkelosky I have a PR but have no permissions to push the feature branch. Help?

@dkelosky
Copy link
Owner

dkelosky commented Apr 5, 2019

Thats great, thank you! I assume you cloned this repo to make your branch. Instead, please fork the repo, open a branch, push there, and then open the PR.

@dkelosky
Copy link
Owner

dkelosky commented Apr 5, 2019

fixed by #77 and published @1.13.2, thanks!

@dkelosky dkelosky closed this as completed Apr 5, 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

No branches or pull requests

2 participants