Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update should to version 11.2.0 🚀 #50

Closed
wants to merge 10 commits into from
6 changes: 4 additions & 2 deletions .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"
4 changes: 3 additions & 1 deletion 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
Expand Down
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -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": "^11.2.0",
"should-http": "0.0.4",
"supertest": "^2.0.0"
},
"scripts": {
"test": "NODE_ENV=test mocha --require should --reporter spec",
Expand Down
7 changes: 4 additions & 3 deletions test/index.js
Expand Up @@ -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')
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -286,4 +287,4 @@ describe('Compress', function () {
.get('/')
.expect('asdf', done)
})
})
})