okunishinishi/node-injectmock

View on GitHub
doc/guides/04.API.md.hbs

Summary

Maintainability
Test Coverage
API Guide
-----

#### `injectmock(module, key, value)`

Inject a mock to module.


#### `injectmock.restore(module, key)`

Restore an injected.


#### `injectmock.restoreAll()`

Restore all injected.


#### `injectmock.new()`

Returns a new `injectmock` context, which has separated mock stacks.


#### `injectmock.noop()`

Do nothing. You can use this method as mock to do nothing.