Comments (5)
On my project, I am just getting screenshot tests integrated for the first time, so having a blocker like this right when I am getting the test environment set up was very disruptive for me. I needed to move forward, and I have found a small, temporary work around for now.
I made a local copy of this Jest Matcher in my project, so I could change the pngjs
dependency to its fork, pngjs-nozlib
. This fork was a drop in replacement. Doing this, I was able to work around this issue for now, although I have no idea how much of an impact this change will have with respect to compression, speed, or accuracy.
EDIT: Sorry about the below misclick
from jest-image-snapshot.
@adrianmcli The only thing that can be done from the Jest-image-snapshot side would be to use a different library than pngjs (maybe using the solution @Kraxxis has) but I need to evaluate our choices first and make sure no regressions are caused by the switch. I’ll do that today.
from jest-image-snapshot.
Thanks for bringing this to my attention. I’ll be tracking the issue on the pngjs package and evaluating if there is anything I can do.
from jest-image-snapshot.
I’ll be tracking the issue on the pngjs package and evaluating if there is anything I can do.
@anescobar1991 any news on the progress of this bug? I am trying to deploy visual regression testing with this library, but I don't want to break the team's builds.
Perhaps we should integrate Kraxxis' workaround into this project?
from jest-image-snapshot.
Assuming that pngjs-nozlib
really does work out of the box with node 9.x.x as @Kraxxis mentions (I have not tried myself) I think the right thing to do here is to open a PR to pngjs
with the changes from pngjs-nozlib
. It looks like the only thing pngjs
would lose from that solution is backwards compatibility with node 0.10 which I am thinking the pngjs
author may be okay with at this point as long as it is versioned appropriately.
Otherwise I don't feel comfortable using pngjs-nozlib
in jest-image-snapshot
as there is no guarantee of maintenance (as evidenced by fact that https://www.npmjs.com/package/pngjs-nozlib does not even point to the correct github repo). Aside from that sadly there are not really any pngjs
alternatives available that I could find.
@Kraxxis or @adrianmcli do you mind looking into this?
from jest-image-snapshot.
Related Issues (20)
- Inconsistent images HOT 2
- Reduce distribution size HOT 3
- Jest 28 support HOT 9
- The "path" argument must be of type string. Received undefined HOT 3
- Advice for handling visual discrepancies between Intel and Apple Silicon images HOT 11
- Screenshot name for received image HOT 9
- support jest 29 HOT 1
- TypeError: Cannot read properties of undefined (reading '_counters') HOT 1
- Please add optional peer dependency HOT 1
- [Feature Request]: would it be possible to make the inline image diff size configurable?
- failureThresholdType=percent is confusing HOT 1
- `updatePassedSnapshot` updates all snapshot regardless of jest `--updatesnapshot` value HOT 1
- Allow custom comparisonMethod
- Reporting a vulnerability HOT 1
- storeReceivedOnFailure refuses to store received images in a CI environment HOT 1
- [Feature request] Expose `onBeforeWriteToDisk` hook (to manipulate EXIF data) HOT 4
- Always generate diff snapshots HOT 1
- Scrolled to bottom element screenshot clips bottom HOT 1
- [BUG] Outdated-snapshot-reporter fails with custom snapshot ids
- Vitest currentTestName causing ENAMETOOLONG HOT 2
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-image-snapshot.