Last active
October 13, 2015 16:33
-
-
Save elicwhite/ea6f24d006175c0e63f1 to your computer and use it in GitHub Desktop.
Expose private functions object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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