Permalink
Browse files

*

  • Loading branch information...
1 parent 17434fe commit 01cc3ffe3c4f6556198938c3fb0015881e1ee2a7 @lichangwei committed Feb 2, 2013
Showing with 22 additions and 2 deletions.
  1. +1 −1 .travis.yml
  2. +20 −0 Makefile
  3. +1 −1 package.json
View
@@ -1,3 +1,3 @@
language: node_js
node_js:
- - 0.8
+ - 0.8
View
@@ -0,0 +1,20 @@
+TESTS = test/*.js
+REPORTER = spec
+TIMEOUT = 5000
+
+test:
+ @NODE_ENV=test ./node_modules/mocha/bin/mocha \
+ --reporter $(REPORTER) \
+ --timeout $(TIMEOUT) \
+ $(TESTS)
+
+test-cov:
+ @rm -rf ./lib-cov
+ @$(MAKE) lib-cov
+ @QINIU_COV=1 $(MAKE) test REPORTER=dot
+ @QINIU_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
+
+lib-cov:
+ @jscoverage lib $@
+
+.PHONY: test-cov test lib-cov
View
@@ -19,7 +19,7 @@
"engines": ["node >= 0.6"],
"scripts": {
"start": "",
- "test": "test/*",
+ "test": "make test",
"preinstall": "",
"install": ""
},

0 comments on commit 01cc3ff

Please sign in to comment.