Skip to content

Instantly share code, notes, and snippets.

@yorkie
Created February 21, 2015 08:57
Show Gist options
  • Save yorkie/ca27fefa30222246e86b to your computer and use it in GitHub Desktop.
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)
test:
ifneq ($(module),)
mocha /path/to/your/tests/$(module).js
else
mocha /path/to/your/tests/*.js
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