Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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": "^10.0.0",
"should-http": "0.1.0",
"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
Original file line number Diff line number Diff line change
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)
})
})
})