Hacker News new | past | comments | ask | show | jobs | submit login
How to test React components using Karma and webpack (nicolasgallagher.com)
2 points by pimpl on June 5, 2015 | hide | past | favorite | 1 comment



I recently switched a project to Webpack and ended up do ing something very similar to run tests through Webpack and Mocha, since this project is isomorphic and leverages Bundles on both server and client.

require.context is a good way to bundle an entire directory, as NPM modules like "require-directory" won't work in client builds.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: