TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to test React components using Karma and webpack

2 pointsby pimplabout 10 years ago

1 comment

ericclemmonsabout 10 years ago
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.<p>require.context is a good way to bundle an entire directory, as NPM modules like &quot;require-directory&quot; won&#x27;t work in client builds.