diff --git a/src/index.js b/src/index.js index a6a81d1..e4a38d6 100644 --- a/src/index.js +++ b/src/index.js @@ -34,7 +34,6 @@ export const mockRes = (options = {}) => { json: sinon.stub().returns(ret), jsonp: sinon.stub().returns(ret), links: sinon.stub().returns(ret), - locals: {}, location: sinon.stub().returns(ret), redirect: sinon.stub().returns(ret), render: sinon.stub().returns(ret), @@ -47,5 +46,7 @@ export const mockRes = (options = {}) => { vary: sinon.stub().returns(ret), write: sinon.stub().returns(ret), writeHead: sinon.stub().returns(ret), - }, options) + }, + options, + { locals: new Object(options.locals || {}) }) }