rwjblue / codemod-cli

MIT License
89 stars 34 forks source link

add support for --updateSnapshot #53

Open tmquinn opened 5 years ago

rwjblue commented 5 years ago

Say more? How would like to use it, what would that look like?

tmquinn commented 5 years ago

Similar to the jest --updateSnapshot. It would provide a way to update .output test fixtures with the currently rendering version of the .input.

jest provides a menu selection to choose which fixtures you would like to update, as described here: https://jestjs.io/docs/en/snapshot-testing#updating-snapshots

dogoku commented 5 years ago

That's something that jscodeshift needs to do first. See https://github.com/facebook/jscodeshift/issues/135

Once they update their testUtils to generate tests using snapshots instead of their custom way, then it would be easy to simply pipe the argument to jest

rwjblue commented 4 years ago

I think we can do it actually. @turbo87 did something similar over in https://github.com/ember-codemods/ember-angle-brackets-codemod/pull/138.

Hypnosphi commented 4 years ago

PR fixing this: https://github.com/facebook/jscodeshift/pull/297