diff --git a/.travis.yml b/.travis.yml index 4eb8e39..c2b6c6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ node_js: -- "4" -- "5" +- 4 +- 5 +- 6 +- 7 language: node_js script: "npm run test-travis" after_script: "npm install coveralls@2.10.0 && cat ./coverage/lcov.info | coveralls" diff --git a/README.md b/README.md index ca503a9..833356d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ -# Koa Compress [![Build Status](https://travis-ci.org/koajs/compress.png)](https://travis-ci.org/koajs/compress) +# Koa Compress [![Build Status](https://travis-ci.org/koajs/compress.svg?branch=master)](https://travis-ci.org/koajs/compress) Compress middleware for Koa +Install `v1.x` for Koa v1. Install `v2.x` or `next` for Koa v2. + ## Example ```js diff --git a/package.json b/package.json index 7267c31..0bee82f 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,10 @@ "devDependencies": { "istanbul": "^0.4.2", "koa": "^1.0.0", - "mocha": "^2.4.1", - "should": "^3.0.0", - "supertest": "^1.0.0" + "mocha": "^3.1.2", + "should": "^10.0.0", + "should-http": "0.1.0", + "supertest": "^2.0.0" }, "scripts": { "test": "NODE_ENV=test mocha --require should --reporter spec", diff --git a/test/index.js b/test/index.js index aa0ee10..f9a325b 100644 --- a/test/index.js +++ b/test/index.js @@ -8,6 +8,8 @@ var fs = require('fs') var path = require('path') var compress = require('..') +require("should-http") + describe('Compress', function () { var buffer = crypto.randomBytes(1024) var string = buffer.toString('hex') @@ -222,8 +224,7 @@ describe('Compress', function () { request(app.listen()) .head('/') - .expect(200) - .expect('', function (err, res) { + .expect(200, function (err, res) { if (err) return done(err) @@ -286,4 +287,4 @@ describe('Compress', function () { .get('/') .expect('asdf', done) }) -}) \ No newline at end of file +})