react-redux-universal-hot-example icon indicating copy to clipboard operation
react-redux-universal-hot-example copied to clipboard

change front-end unit tests to use enzyme with karma

Open leopoldjoy opened this issue 9 years ago • 3 comments

Updated front-end unit tests configuration to use enzyme along with karma. Also updated the InfoBar example to use enzyme. Note, the @connect decorator had to be swapped for ES6 syntax in order to allow for enzyme shallow rendering; for more information about the @connect decorator and enzyme, see @lelandrichardson 's comment here regarding how to export components for testing when using enzyme.

leopoldjoy avatar Apr 17 '16 01:04 leopoldjoy

I like this, will look over it at some stage. Im using enzyme on a couple of micro-services. Its great.

andrewmclagan avatar Apr 20 '16 11:04 andrewmclagan

Also, note, the assertions in my InfoBar tests in my fork are written with expect, however I would be happy to push my version written with chai assertions if the community prefers that.

leopoldjoy avatar Apr 20 '16 16:04 leopoldjoy

I still use this boilerplate and recommend it to others. @erikras thoughts on merging this pr?

leopoldjoy avatar Jun 27 '17 03:06 leopoldjoy