Closed timdorr closed 8 years ago
Yup - @cpojer was on my case about this as well. We should take the scaffolding from his codemod repos, then use the changes to our tests as fixtures.
I've had success running tests with the following structure: https://github.com/joshblack/codemods/tree/master/test just adding in folders for tests as developers make issues on the repo. Any thoughts? Would love to help contribute to this repo and adding tests seems like a good start.
@joshblack Yeah, definitely! If you want to open a PR, that would be super duper helpful.
The setup from https://github.com/reactjs/react-codemod can literally be copy and pasted. A bunch of other forks use the same structure, it would be nice to keep some sort of consistency.
Sounds good, consistency is important.
Do we have example project files that the mods were ran against that I can start filling the test cases out with?
@joshblack The tests and examples on history and React Router, actually.
Perfect, thanks for the heads up!
Just wanted to give an update, currently working on this here: https://github.com/joshblack/rackt-codemod just have to add the history tests and I'll open up a PR.
Awesome!
The purpose of each codemod is pretty opaque, so we can both test the modification and get some built-in examples if we're able to build out a test suite.