Giter Club home page Giter Club logo

Comments (5)

Kraxxis avatar Kraxxis commented on May 18, 2024 7

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.

anescobar1991 avatar anescobar1991 commented on May 18, 2024 5

@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.

anescobar1991 avatar anescobar1991 commented on May 18, 2024

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.

adrianmcli avatar adrianmcli commented on May 18, 2024

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.

anescobar1991 avatar anescobar1991 commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.