I'm currently trying to set up testing in Mocha for an application I'm writing using Zappa.js. So far I've been following this tutorial, and converting what I need from JS to Coffeescript.
However I'm a little stuck with trying to run tests. I have a Makefile, which currently looks like this:
REPORTER = dot
test:
@NODE_ENV=test ./node_modules/.bin/mocha \
--reporter $(REPORTER) \
.PHONY: test
And I've set up my package.json file to run tests like so:
{
"scripts": {
"test": "make test"
}
}
The issue I'm finding is that, because I'm trying to write my Mocha tests using Coffeescript as well, Mocha does not pick up any of my tests in the "test/" folder when I run "npm test". I know for a fact that I can tell Mocha to run .coffee files by using the following in Terminal (which works):
mocha --compilers coffee:coffee-script
What I want to know is how do I go about telling Mocha to use Coffeescript files by default?