Created
February 21, 2015 08:57
-
-
Save yorkie/ca27fefa30222246e86b to your computer and use it in GitHub Desktop.
How to create a modular test suite in Makefile (also namely: using parameters in Makefile)
This file contains hidden or 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
test: | |
ifneq ($(module),) | |
mocha /path/to/your/tests/$(module).js | |
else | |
mocha /path/to/your/tests/*.js |
This file contains hidden or 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
make test module=user | |
// then it would only run the test/user.js | |
make test | |
// then it would run all tests under your project |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment