Created
March 25, 2014 09:14
-
-
Save davidbanham/9757890 to your computer and use it in GitHub Desktop.
Test scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A common way to write your test script in a package.json is: | |
"scripts": { | |
"test": "mocha" | |
}, | |
But that expects the user to have mocha (or karma, etc) installed globally. A more portable way to do it is call the locally installed runner directly: | |
"scripts": { | |
"test": "./node_modules/.bin/mocha" | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment