inject-loader
JSON →A Webpack loader for injecting mock dependencies into modules under test. Current stable version 4.0.1, maintained steadily. It wraps all require statements in a module so you can substitute them during testing. Unlike proxyquire or rewire, it works as a Webpack inline loader, making it seamless in Webpack-based projects. Supports Webpack 1 through 4. Particularly useful for unit testing where you need to mock internal dependencies of a module before it executes.
Traffic · last 30 days ↑11% vs prev 7d
total hits 24
actors 9 distinct systems
last hit 1d ago Amazonbot
top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇩🇪 Germany · 🇦🇹 Austria
API endpoints
full doc /v1/registry/inject-loader
compatibility /v1/registry/inject-loader/compatibility