bahmutov / snap-shot

Jest-like snapshot feature for the rest of us, works magically by finding the right caller function
169 stars 3 forks source link

Use `jest-snapshot`? #43

Open cpojer opened 7 years ago

cpojer commented 7 years ago

Hey! I love what you are doing here. Did you know that the jest-snapshot package is standalone and can be used to use snapshots outside of Jest? I'd like to understand what motivated you to build a completely separate version of this feature rather than integrating jest-snapshot and sharing the same infrastructure across test frameworks. Thanks!

hartzis commented 7 years ago

just for reference, jest-snapshot source and npm

bahmutov commented 7 years ago

A couple of reasons (and I have seen the jest-snapshot and the discussion in Ava's case https://github.com/facebook/jest/issues/2497)

Another big part in this was my desire to try out automated release process where all tests would be in separate modules using semantic-release plugin dont-crack + automated dependency upgrades using greenkeeper.io. This seems to work pretty well, but I needed full control to set this up.

cpojer commented 7 years ago

Thanks, that's a good answer! I'm wondering about how the State constructor in jest-snapshot could be changed to make it work well for your use base. Since we are fundamentally doing the same thing (like, literally exactly the same thing), I believe there is value in sharing some infrastructure. Do you agree? :)

bahmutov commented 7 years ago

all for it, will do!

SimonSimCity commented 5 years ago

I'm just looking into this plugin and was stumbling on this post ...

@cpojer how would you use jest-snapshot in another system than jest? I want to use it in combination with mocha but it seems that there is no documentation available, so sticking to this extension would be my choice here.

@bahmutov your first argument just because I could is an argument I can understand from a personal perspective, but out of a business perspective this argument would rather give me a reason to go with jest-snapshot.