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 stale · no recent hits
total hits 13
actors 3 distinct systems
last hit 17d ago AhrefsBot
top countries VN · 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany
API endpoints
full doc /v1/registry/inject-loader
compatibility /v1/registry/inject-loader/compatibility