Skip to content

Instantly share code, notes, and snippets.

@TheSavior
Last active October 12, 2015 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheSavior/3b4cbf7c564cf6d7d7a1 to your computer and use it in GitHub Desktop.
Save TheSavior/3b4cbf7c564cf6d7d7a1 to your computer and use it in GitHub Desktop.
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