How Can I Define a Test Directory for Mocha?

471 views Asked by At

I've written my tests using ES6 and executed them (with code coverage report) as follows:

$> babel-node isparta cover _mocha backend/tests

However, the tests are not found. It only works when I have a ./test directory.

Any suggestions on how I can define a different test directory?

1

There are 1 answers

1
Philipp Andreychev On BEST ANSWER

You'd better try to use the following syntax:

babel-node isparta cover _mocha -- './backend/tests/*' --recursive