Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

*

  • Loading branch information...
commit 01cc3ffe3c4f6556198938c3fb0015881e1ee2a7 1 parent 17434fe
@lichangwei authored
Showing with 22 additions and 2 deletions.
  1. +1 −1  .travis.yml
  2. +20 −0 Makefile
  3. +1 −1  package.json
View
2  .travis.yml
@@ -1,3 +1,3 @@
language: node_js
node_js:
- - 0.8
+ - 0.8
View
20 Makefile
@@ -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
2  package.json
@@ -19,7 +19,7 @@
"engines": ["node >= 0.6"],
"scripts": {
"start": "",
- "test": "test/*",
+ "test": "make test",
"preinstall": "",
"install": ""
},
Please sign in to comment.
Something went wrong with that request. Please try again.