Use rewire to test nonExported javascript function.
After rewire the target js file, you can use "__get__" to get the method you are going to test.
http://stackoverflow.com/questions/14874208/how-to-access-and-test-an-internal-non-exports-function-in-a-node-js-module
https://github.com/jhnns/rewire
No comments:
Post a Comment