From 4816cd76f09171496f95b9fcefb0113f30c91229 Mon Sep 17 00:00:00 2001 From: jongleberry Date: Tue, 14 Mar 2017 01:54:14 -0700 Subject: [PATCH] :arrow-up: deps closes #939 --- History.md | 2 ++ Makefile | 2 +- lib/application.js | 2 -- package.json | 16 ++++++++-------- test/.eslintrc | 1 + test/application/respond.js | 17 +++++++++-------- test/context/onerror.js | 1 - 7 files changed, 21 insertions(+), 20 deletions(-) diff --git a/History.md b/History.md index 9533df7..218042a 100644 --- a/History.md +++ b/History.md @@ -4,6 +4,8 @@ next * fix: drop `package.engines.node` requirement to >= 6.0.0 * this fixes `yarn`, which errors when this semver range is not satisfied + * bump `cookies@~0.7.0` + * bump `fresh@^0.5.0` 2.1.0 / 2017-03-07 ================== diff --git a/Makefile b/Makefile index 85710b6..2741e8a 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ TESTS = test/application/* \ test/response/* lint: - @./node_modules/.bin/eslint benchmarks lib test + @./node_modules/.bin/eslint benchmarks lib test --fix test: @NODE_ENV=test node \ diff --git a/lib/application.js b/lib/application.js index d68a995..a2eaa11 100644 --- a/lib/application.js +++ b/lib/application.js @@ -30,7 +30,6 @@ const deprecate = require('depd')('koa'); */ module.exports = class Application extends Emitter { - /** * Initialize a new `Application`. * @@ -185,7 +184,6 @@ module.exports = class Application extends Emitter { console.error(msg.replace(/^/gm, ' ')); console.error(); } - }; /** diff --git a/package.json b/package.json index 23f69f0..57be0d8 100644 --- a/package.json +++ b/package.json @@ -21,14 +21,14 @@ "accepts": "^1.2.2", "content-disposition": "~0.5.0", "content-type": "^1.0.0", - "cookies": "~0.6.1", + "cookies": "~0.7.0", "debug": "*", "delegates": "^1.0.0", "depd": "^1.1.0", "destroy": "^1.0.3", "error-inject": "~1.0.0", "escape-html": "~1.0.1", - "fresh": "^0.3.0", + "fresh": "^0.5.0", "http-assert": "^1.1.0", "http-errors": "^1.2.8", "is-generator-function": "^1.0.3", @@ -45,16 +45,16 @@ }, "devDependencies": { "babel-eslint": "^7.1.1", - "eslint": "^2.5.3", - "eslint-config-standard": "^5.1.0", - "eslint-plugin-babel": "^3.1.0", - "eslint-plugin-promise": "^1.1.0", - "eslint-plugin-standard": "^1.3.1", + "eslint": "^3.17.1", + "eslint-config-standard": "^7.0.1", + "eslint-plugin-babel": "^4.1.1", + "eslint-plugin-promise": "^3.5.0", + "eslint-plugin-standard": "^2.1.1", "istanbul": "^0.4.0", "mocha": "^3.2.0", "should": "^6.0.3", "should-http": "0.0.3", - "supertest": "^1.0.1", + "supertest": "^3.0.0", "test-console": "^0.7.1" }, "engines": { diff --git a/test/.eslintrc b/test/.eslintrc index cda2f26..a8961d1 100644 --- a/test/.eslintrc +++ b/test/.eslintrc @@ -3,3 +3,4 @@ env: rules: space-before-blocks: [2, {functions: never, keywords: always}] + no-unused-expressions: 0 diff --git a/test/application/respond.js b/test/application/respond.js index 3b94ee1..a2a6861 100644 --- a/test/application/respond.js +++ b/test/application/respond.js @@ -73,7 +73,7 @@ describe('app.respond', () => { if (err) return done(err); res.should.have.header('Content-Type', 'text/plain; charset=utf-8'); res.should.have.header('Content-Length', '5'); - assert(0 == res.text.length); + assert(!res.text); done(); }); }); @@ -94,7 +94,7 @@ describe('app.respond', () => { if (err) return done(err); res.should.have.header('Content-Type', 'application/json; charset=utf-8'); res.should.have.header('Content-Length', '17'); - assert(0 == res.text.length); + assert(!res.text); done(); }); }); @@ -115,7 +115,7 @@ describe('app.respond', () => { if (err) return done(err); res.should.have.header('Content-Type', 'text/plain; charset=utf-8'); res.should.have.header('Content-Length', '11'); - assert(0 == res.text.length); + assert(!res.text); done(); }); }); @@ -136,7 +136,7 @@ describe('app.respond', () => { if (err) return done(err); res.should.have.header('Content-Type', 'application/octet-stream'); res.should.have.header('Content-Length', '11'); - assert(0 == res.text.length); + assert(!res.text); done(); }); }); @@ -265,7 +265,7 @@ describe('app.respond', () => { request(server) .get('/') .expect(400) - .expect('Content-Length', 11) + .expect('Content-Length', '11') .expect('Bad Request', done); }); }); @@ -509,7 +509,7 @@ describe('app.respond', () => { }); describe('when .body is a Buffer', () => { - it('should respond', done => { + it('should respond', () => { const app = new Koa(); app.use(ctx => { @@ -518,9 +518,10 @@ describe('app.respond', () => { const server = app.listen(); - request(server) + return request(server) .get('/') - .expect('Hello', done); + .expect(200) + .expect(new Buffer('Hello')); }); }); diff --git a/test/context/onerror.js b/test/context/onerror.js index d567259..43716df 100644 --- a/test/context/onerror.js +++ b/test/context/onerror.js @@ -190,4 +190,3 @@ describe('ctx.onerror(err)', () => { }); }); }); -