Jeanluca Scaljeri
Jeanluca Scaljeri

Reputation: 29179

How Can I Define a Test Directory for Mocha?

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?

Upvotes: 3

Views: 462

Answers (1)

Philipp Andreychev
Philipp Andreychev

Reputation: 1648

You'd better try to use the following syntax:

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

Upvotes: 2

Related Questions