Skip to content

Instantly share code, notes, and snippets.

@infojunkie
Last active December 4, 2020 01:20
Show Gist options
  • Save infojunkie/d69662419c42ea6c6b700fa929a19ba3 to your computer and use it in GitHub Desktop.
Save infojunkie/d69662419c42ea6c6b700fa929a19ba3 to your computer and use it in GitHub Desktop.
Running specific tests using mocha from a package.json script
"scripts": {
"test": "mocha --grep /${TEST:-'.*'}/i",
},
@infojunkie
Copy link
Author

infojunkie commented Nov 27, 2020

Call as TEST=keyword npm test or just npm test to run all tests. keyword is matched case-insensitively.

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