Skip to content

Instantly share code, notes, and snippets.

@timoxley
Created February 2, 2012 04:58
Show Gist options
  • Star 35 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save timoxley/1721593 to your computer and use it in GitHub Desktop.
Save timoxley/1721593 to your computer and use it in GitHub Desktop.
Recursively run all tests in test directory using mocha
// this will find all files ending with _test.js and run them with Mocha. Put this in your package.json
"scripts": {
"test": "find ./tests -name '*_test.js' | xargs mocha -R spec"
},
@ANUR46
Copy link

ANUR46 commented Sep 21, 2023

for me its working using --recursive

"scripts": {
    "test": "mocha --recursive --exit"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment