From 886cc315d187de1861ebd185a5853db82a85f538 Mon Sep 17 00:00:00 2001 From: Mirza Kapetanovic Date: Sun, 2 Nov 2014 10:31:17 +0100 Subject: [PATCH] Update express dev dependency to version 4 --- package.json | 6 ++++-- test/integration/multifetch.spec.js | 3 ++- test/server.js | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cab12db..3581276 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,15 @@ }, "devDependencies": { "request": "~2.30.0", - "express": "~3.4.7", + "express": "~4.10.1", "mocha": "~1.15.1", "chai": "~1.8.1", "sinon": "~1.7.3", "sinon-chai": "~2.4.0", "mocha-jshint": "~0.0.7", - "once": "~1.3.0" + "once": "~1.3.0", + "method-override": "~2.3.0", + "body-parser": "~1.9.2" }, "license": "MIT", "keywords": [ diff --git a/test/integration/multifetch.spec.js b/test/integration/multifetch.spec.js index ecb6e69..aab47e7 100644 --- a/test/integration/multifetch.spec.js +++ b/test/integration/multifetch.spec.js @@ -52,7 +52,8 @@ describe('multifetch', function() { chai.expect(body) .to.have.property('user') .to.have.property('headers') - .to.have.property('content-type', 'application/json'); + .to.have.property('content-type') + .to.match(/^application\/json/); }); it('should contain user_1', function() { diff --git a/test/server.js b/test/server.js index 4fda810..2b541c2 100644 --- a/test/server.js +++ b/test/server.js @@ -2,6 +2,9 @@ var fs = require('fs'); var path = require('path'); var express = require('express'); +var methodOverride = require('method-override'); +var bodyParser = require('body-parser'); + var users = require('./fixtures/users'); var albums = require('./fixtures/albums'); @@ -56,8 +59,8 @@ var album = function(request, response, next) { var create = function() { var app = express(); - app.use(express.json()); - app.use(express.methodOverride()); + app.use(bodyParser.json()); + app.use(methodOverride()); app.use(function(request, response, next) { response.notFound = function() {