babel-plugin-rewire-ts
JSON →A Babel plugin that enables mocking of module dependencies for testing, based on the rewire.js concept. The current stable version is 1.4.0, with a release cadence that is maintenance-focused. It is a fork of babel-plugin-rewire with added TypeScript compatibility. Key differentiators: it works with TypeScript, supports ES6 imports, CommonJS require(), and named/top-level function rewiring. It provides a RewireAPI object for convenient mocking in tests. It is specifically designed for unit testing where module dependencies need to be replaced with mocks or stubs.
Traffic · last 30 days ↑40% vs prev 7d
total hits 25
actors 8 distinct systems
last hit 2d ago AhrefsBot
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇫🇷 France · 🇨🇦 Canada
Resources
API endpoints
full doc /v1/registry/babel-plugin-rewire-ts
compatibility /v1/registry/babel-plugin-rewire-ts/compatibility