react-webpack-generators / generator-react-webpack

Yeoman generator for ReactJS and Webpack
http://newtriks.com/2013/12/31/automating-react-with-yeoman-and-grunt/
MIT License
2.88k stars 355 forks source link

There is no 'helpers/shallowRenderHelper' anymore. #288

Closed twang2218 closed 7 years ago

twang2218 commented 7 years ago

If set generatedWithVersion: 3, the generated test case will fail to find the helpers/shallowRenderHelper anymore, as it's been replaced by shallow from enzyme now.

weblogixx commented 7 years ago

Hello @twang2218,

that is true. We do not plan to release it with version 4, as there are much better and smoother ways to test (e.g. enzyme). The shallowRenderHelper was a stopgap measure because there was no such solution at the time. We integrated the generatedWithVersion key in the yo rc to make our changes backwards compatible and old projects may still use them.

That said, if you create a project with version 4 and set the version to 3, it will always create the neccesairy testfiles for version 3, which depend on shallowRenderHelper.

Hope this helps.

weblogixx commented 7 years ago

Closing this due to inactivity. Please feel free to reopen this issue if you have further questions.