Created
March 13, 2018 22:20
-
-
Save gunar/095de229962184ef2f897293c4b93d94 to your computer and use it in GitHub Desktop.
Help mocha find mocha.opts
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
m() { | |
# mocha default path is test/mocha.opts | |
file=$(readlink -f $1) | |
[ -f "test/mocha.opts" ] && (mocha $file) | |
[ -f "../../mocha.opts" ] && (cd ../../../ && mocha $file) | |
[ -f "../../../mocha.opts" ] && (cd ../../../../ && mocha $file) | |
[ -f "../../../../mocha.opts" ] && (cd ../../../../../ && mocha $file) | |
[ -f "../../../../../mocha.opts" ] && (cd ../../../../../../ && mocha $file) | |
[ -f "../../../../../../mocha.opts" ] && (cd ../../../../../../../ && mocha $file) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment