From 9af69507f28b575e5c2ad9ac5f51b684cd22f1fd Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Mon, 3 Mar 2014 18:19:23 +0800 Subject: [PATCH] use istanbul replace blanket. gotwarlost/istanbul#44 --- .gitignore | 4 +++- .npmignore | 2 ++ .travis.yml | 1 - Makefile | 16 +++------------- package.json | 21 +++------------------ 5 files changed, 11 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index d9b036f..d05ba47 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,6 @@ logs results node_modules -npm-debug.log \ No newline at end of file +npm-debug.log +.DS_Store +coverage/ diff --git a/.npmignore b/.npmignore index c761bba..7463b92 100644 --- a/.npmignore +++ b/.npmignore @@ -3,3 +3,5 @@ coverage.html Makefile .travis.yml logo.png +.DS_Store +coverage/ diff --git a/.travis.yml b/.travis.yml index b5257f8..0104e02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ language: node_js node_js: - '0.11' -script: make test-coveralls diff --git a/Makefile b/Makefile index 73b268d..15fbb40 100644 --- a/Makefile +++ b/Makefile @@ -7,24 +7,14 @@ install: @npm install --registry=http://r.cnpmjs.org --cache=${HOME}/.npm/.cache/cnpm test: install - @NODE_ENV=test ./node_modules/.bin/mocha \ - --harmony \ + @NODE_ENV=test node --harmony \ + node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha \ + -- -u exports \ --reporter $(REPORTER) \ --timeout $(TIMEOUT) \ $(MOCHA_OPTS) \ $(TESTS) -test-cov: install - @$(MAKE) test MOCHA_OPTS='--require blanket' REPORTER=html-cov | ./node_modules/.bin/cov - -cov: test-cov - -test-coveralls: test - @echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID) - @-$(MAKE) test MOCHA_OPTS='--require blanket' REPORTER=mocha-lcov-reporter | ./node_modules/.bin/coveralls - -test-all: test test-cov - autod: install @./node_modules/.bin/autod -w @$(MAKE) install diff --git a/package.json b/package.json index e16bdae..7dd2caf 100644 --- a/package.json +++ b/package.json @@ -4,35 +4,20 @@ "description": "gzip support for koa responses.", "main": "index.js", "scripts": { - "test": "make test-all" - }, - "config": { - "blanket": { - "pattern": "koa-gzip/index.js", - "data-cover-flags": { - "debug": false - } - }, - "travis-cov": { - "threshold": 100 - } + "test": "make test" }, "dependencies": { "thunkify-wrap": "0.0.3" }, "devDependencies": { "autod": "*", - "blanket": "*", "contributors": "*", - "cov": "*", - "coveralls": "*", + "istanbul": "*", "koa": "0.5.0", "mm": "0.2.0", "mocha": "*", - "mocha-lcov-reporter": "*", "should": "3.1.3", - "supertest": "0.9.0", - "travis-cov": "*" + "supertest": "0.9.0" }, "homepage": "https://github.com/fengmk2/koa-gzip", "repository": {