I am just getting started unit testing nodejs. I have been using mocha, chai and sinon.
I hit a snag when I wanted to test a function which is not exported. proxyquire looks good, as does rewire.
There are lots of tutorials, but they tend to be simplistic. E.g
// Software under test
function saySecret() { // this function is *not* exported
return '