Skip to content

Instantly share code, notes, and snippets.

@TheSavior
Last active October 13, 2015 16:33
Show Gist options
  • Save TheSavior/ea6f24d006175c0e63f1 to your computer and use it in GitHub Desktop.
Save TheSavior/ea6f24d006175c0e63f1 to your computer and use it in GitHub Desktop.
Expose private functions object
var privateState = require('privatestate');
function formatString(date) {
return date.toDateString();
}
var Utils = {
getDateString: function(date) {
return 'today is ' + formatString(date);
}
};
privateState.registerTestingFunctions(Utils, ['formatString']);
module.exports = Utils;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment