Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var proxyquire = require('proxyquire');
describe('utils#getString', function() {
it('should print helper.msg', function() {
var HelperStub = {
msg: 'stub msg'
};
var utils = proxyquire('../server/utils', {
'./helper': HelperStub
});
assert.equal(utils.getString(), 'stub msg');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment