Detuned
Detuned

Reputation: 3748

How to run mocha across entire app matching any files *.spec.js?

I've tried the following:

mocha $(find . -name *.spec.js')

and

mocha . -name *.spec.js --recursive

However, I still get no matching files. Thoughts?

Upvotes: 2

Views: 799

Answers (1)

Aule
Aule

Reputation: 660

Try this:

mocha "./**/*.spec.js"

(the -name flag belongs to the find command so isn't needed when not using find)

Also I think your variant with find should work as well, if you remove the single quote character at the end (but maybe that was just a mistake when writing the question):

mocha $(find . -name *.spec.js)

Upvotes: 3

Related Questions