Comments (8)
@michalg42 I am the maintainer of jest-image-snapshot and just wanted to let you know that I am working on a solution to this issue.
Should have something in next few days. Follow americanexpress/jest-image-snapshot#49 for more details/updates :)
from jest-puppe-shots.
Hi @michalg42, In such a case you might just update the existing image snapshot with the --u
param passed to the jest CLI ex. npm run test -- -u
from jest-puppe-shots.
Yeah, I know, the problem is I would like to check what has changed in these components. In all other I have image created by jest-image-snapshot I can can quickly check differences, here I only know something has changed and I can either believe everything is fine and run --u or check with master older commit.
I know that technically that's not a problem of jest-puppe-shots, unfortunatelly in issue in jest-image-snapshots there was answer that probably its user who should pre-process these images to match sizes.
from jest-puppe-shots.
Yep, I will have to take a closer look into to the jest-image-snapshots
library. I guess one of the solutions might be downsizing or resizing the snapshot for the comparison purpose. But then it could cut part of the image the is needed for the comparison.
from jest-puppe-shots.
Problem with downsizing of snapshot is, as you told, it could cut part of the image and in some cases two different components can pass tests because of that (ass all changes you did to component were cut out of screenshot).
I had to fix this problem and I wrapped toMatchImageSnapshot with my own code - when this function returns error that images aren't equal I create diff image where there are both old and new screenshot (without difference pic), it solves my problem in some way as I can compare both versions on one image, but I used there part of jest-image-snapshot code and that wasn't too elegant solution...
from jest-puppe-shots.
I guess it can be closed now as it has been fixed in jest-image-snapshots v2.4.0
from jest-puppe-shots.
@michalg42 Let me know if you manage to resolve the problem. You can also contribute to the project and update the FAQ in REAMDE for this case 😄
from jest-puppe-shots.
Is this correct issue for that comment? As this problem was already resolved by new version of jest-image-snapshots so there is no problem to be fixed. :)
from jest-puppe-shots.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jest-puppe-shots.