{"library":"babel-plugin-rewire-ts","type":"library","category":null,"description":"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.","language":"javascript","status":"maintenance","version":"1.4.0","tags":["javascript","babel","plugin","rewire","es6","modules"],"last_verified":"Wed May 27","install":[{"cmd":"npm install babel-plugin-rewire-ts","imports":["import { __Rewire__ } from 'babel-plugin-rewire-ts'","import ModuleUnderTest from './module';\nModuleUnderTest.__get__('dependency')","import { __ResetDependency__ } from 'babel-plugin-rewire-ts'"]},{"cmd":"yarn add babel-plugin-rewire-ts","imports":[]},{"cmd":"pnpm add babel-plugin-rewire-ts","imports":[]}],"homepage":null,"github":"https://github.com/rosswarren/babel-plugin-rewire-ts","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-plugin-rewire-ts","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/babel-plugin-rewire-ts/compatibility"}}