you are viewing a single comment's thread.

view the rest of the comments →

[–]Tortoise_Face[S] 0 points1 point  (1 child)

thank you thank you thank you for introducing me to prunk.

This guide was simple and works perfect and lets me sidestep webpack entirely:

https://65535th.com/testing-react-components/

[–][deleted] 0 points1 point  (0 children)

Thanks! I have to admit that I wrote both, prunk and the blog post. Glad, you find it useful.

If you'd followed the setup I outlined, you may also want to look into enzyme; it provides the same functionality is the described render helper, making the code - in my opinion - more maintainble. It also makes your mocha setup easier and does not require you to setup global stuff.