Giter VIP home page Giter VIP logo

Comments (3)

JBongars avatar JBongars commented on July 18, 2024 1

@gkampitakis just saw the new release, thanks for fixing this issue :)

from go-snaps.

gkampitakis avatar gkampitakis commented on July 18, 2024

Hey 👋 first of all thanks for opening this issue and spending time on this detailed description.

Secondly I would like to know why your pr was not accepted 🤔 If you want to contribute you need to fork the repo, and then create a pull request here with your work. If you did this and didn't work happy to help with this.

As for the issue you mentioned, I can definitely see that when changing a file from LF to CRLF and running the tests it leads to snapshot errors but not on foo_test.go:34: snapshot not found.

snapshot not found is only returned in this case here https://github.com/gkampitakis/go-snaps/blob/main/snaps/matchSnapshot.go#L34-L38 where a snapshot doesn't exist and the go-snaps "detects" that's running on CI so it fails instead of creating the snapshot. So I think the message is not cryptic but does exactly what it says.

As for the LF to CRLF diff errors, I want to spend some time to investigate a bit more on how the library behaves and if it's possible to mitigate or inform the user, else we can add a disclaimer on the docs.

from go-snaps.

gkampitakis avatar gkampitakis commented on July 18, 2024

Thanks for reporting the issue. Looks like my handwritten regex could not handle CRLF so it was not able to find snasphots inside the file and was reporting snapshot not found or wrong format. Tell me if now works for you 😄

from go-snaps.

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.