From: Dan Vanderkam Date: Tue, 27 Oct 2015 14:09:58 +0000 (-0400) Subject: Pass --grep to mocha from the command line. X-Git-Tag: v2.0.0~34^2~1 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=a6d0469d23d09570ea47b87835b6c82a4671b8b4;p=dygraphs.git Pass --grep to mocha from the command line. --- diff --git a/DEVELOP.md b/DEVELOP.md index 7436326..9a13888 100644 --- a/DEVELOP.md +++ b/DEVELOP.md @@ -28,6 +28,12 @@ To iterate on a unit test, run the `watch` command above and open in your browser. You can use the Mocha UI to run just a single test or suite. Or you can change `it` to `it.only` to do run just one test in code. +To run a single test from the command line, you can use: + + npm run test -- --grep highlight-series-background + +(Note the extra `--`.) + ### dygraphs style When making a change, please try to follow the style of the existing dygraphs code. This will make the review process go much more smoothly. diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 4b1c77f..4bc0718 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -18,4 +18,4 @@ trap finish EXIT sleep 1 # Start the tests -mocha-phantomjs http://localhost:8081/auto_tests/runner.html +mocha-phantomjs http://localhost:8081/auto_tests/runner.html "$@"