Jump to letter: [
02349ABCDEFGHIJKLMNOPQRSTUVWXYZ
]
nodejs-rewire - Easy dependency injection for node.js unit testing
- Description:
Rewire adds a special setter and getter to modules so you can
modify their behavior for better unit testing. You may:
* Inject mocks for other modules or globals like process
* Leak private variables
* Override variables within the module.
Rewire does not load the file and eval the contents to emulate
node's require mechanism. In fact it uses node's own require to
load the module. Thus your module behaves exactly the same in
your test environment as under regular circumstances (except
your modifications).
Packages