Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(- meta) Moving
cake test
into a script ... sort of
- Loading branch information
1 parent
88901d1
commit e204e8b
Showing
2 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Usage: | ||
# ------ | ||
# This simply invokes `mocha` with some sensible defaults. | ||
# | ||
# FLAGS="--reporter dot --watch" npm run-script test | ||
# FLAGS="--grep API" npm run-script test | ||
# | ||
# Unfortunately, at the moment, there's no way to pass flags to `npm run-script`; so I roll in flags | ||
# using an environment-variable (`$FLAGS`). See: https://github.com/isaacs/npm/issues/3494 | ||
|
||
env NODE_ENV="$npm_package_config_mocha_ENV" \ | ||
./node_modules/.bin/mocha \ | ||
--compilers coffee:coffee-script \ | ||
--reporter "$npm_package_config_mocha_reporter" \ | ||
--ui "$npm_package_config_mocha_ui" \ | ||
$FLAGS "$npm_package_config_testFiles" |
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