How do I test ‘normal’ (non-Node specific) JavaScript functions with Mocha?
Thanks to the other answers here, I’ve got things working. One thing which wasn’t mentioned though—perhaps because it’s common knowledge among Noders—was that you need to assign the result of the require call to a variable, so that you can refer to it when calling your exported functions from within the test suite. Here’s my … Read more