GithubHelp home page GithubHelp logo

Support non json about snapper HOT 5 OPEN

JTeeuwissen avatar JTeeuwissen commented on May 26, 2024
Support non json

from snapper.

Comments (5)

theramis avatar theramis commented on May 26, 2024

Thanks for the suggestion!

Hmm this is something Snapper V1 used to support but it was much harder to maintain and I didn't see many users wanting that functionality.

Since then I've added Snapshots per class and Child snapshots as features which is something that really only works with json or some form of structured format.

These features would break if we wanted to store without json conversions.

I think there are two options for next steps

  1. Snapper allows customer serialisers for json conversion. You could have a look at implementing one that makes your json conversions easier to read?
  2. If there is enough interest by others I could investigate if Snapper could provide this but with limited functionality.

from snapper.

JTeeuwissen avatar JTeeuwissen commented on May 26, 2024

The second option would match my use case. Child snapshots could be implemented using an extended file name. I could investigate an implementation, if this is something you feel like fits the library.

from snapper.

torstenholva avatar torstenholva commented on May 26, 2024

There is a problem with comparing datetimes in DevOps. When making the snapper json files locally (in another time zone) and then running the tests in DevOps, the time zone might change for the datetime and the test fails.

2020-09-10T00:00:00+03:00 changes to 2020-09-09T21:00:00+00:00

If the json file would be replaced with a snap file (for instance), would the datetime value be compared as a string?

from snapper.

JTeeuwissen avatar JTeeuwissen commented on May 26, 2024

Probably yes,
But I think that is the wrong solution for your problem. Instead, could the test / sut be updated to have a Invariant timezone? Or use a date time without a time zone?

from snapper.

torstenholva avatar torstenholva commented on May 26, 2024

Yes, the latter was our solution to the problem. Will investigate if the first is an option in our context.
And thanks for a great tool, by the way! 👍

from snapper.

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.