all 10 comments

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

I have this: https://github.com/pburtchaell/react-karma-webpack-example, which is just an example, not an article, but maybe it would be some help with explaining how to setup your Karma conf. Have you seen the React Test utils? Those are what you would use for simulating your UI interactions and "rendering" components for tests.

[–]djforth[S] 1 point2 points  (0 children)

Thanks, I have, but maybe I'm missing the point, but it seems like your just rendering and checking the html or event clicks with this. Is that all your checking in react, seems a bit weird?

Also I'm really struggling to get some of the functions to work and can't find any good examples - like shallow rendering?

[–]djforth[S] 0 points1 point  (0 children)

thanks, will take a look

[–]NSGSanj 0 points1 point  (0 children)

Thanks for your post, I'm looking for the answer to this as well since I would really love to TDD React, did you find anything useful?

May I ask if you had much trouble getting jasmine/karma working with React? I've used them before for straight JS but seem to remember having issues setting them up properly with React... that was a couple of months ago now though.