Skip to content

Instantly share code, notes, and snippets.

@fiveisprime
Last active January 1, 2016 23:09
Show Gist options
  • Save fiveisprime/8214397 to your computer and use it in GitHub Desktop.
Save fiveisprime/8214397 to your computer and use it in GitHub Desktop.
Makefile with lint (JSHint), test (mocha), and coverage. Uses locally install modules - make sure that jshint, mocha, and istanbul are devDependencies.
SRC = $(wildcard *.js)
test: $(SRC)
@node_modules/.bin/jshint $^
@node_modules/.bin/istanbul test node_modules/.bin/_mocha \
-R spec -- \
--require should \
--reporter spec
# Uncomment if your tests are in a directory named test.
# .PHONY: test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment