1.0.2 • Published 9 years ago
node-mock v1.0.2
node-mock
Mock existing Node.js modules.
Getting Started
Installation
npm install node-mock --save-dev
Integration
var mock = require('node-mock');
API
mock.require(id, dirname, exports)
var ts = mock.require('typesystem', null, {
// ...
}); // ts === require('typesystem')
var zoe = mock.require('./zoe', __dirname, {
// ...
}); // zoe === require('./zoe')
Running Tests
To run the test suite first install the development dependencies:
npm install
then run the tests:
npm test