Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
damassi committed Jan 22, 2018
1 parent 6c47214 commit cb79d5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/middleware/error_handler.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module.exports = (err, req, res, next) ->
'../../desktop/components/error_handler/index.jade'
)
isDevelopment = NODE_ENV is 'development'
console.log err if isDevelopment
code = 504 if req.timedout
code ||= err.status || 500
message = err.message || err.text || err.toString() if isDevelopment
Expand Down
3 changes: 2 additions & 1 deletion test/lib/middleware/error_handler.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ describe 'errorHandler', ->
stack: 'mad fat stacks'
}

it 'invokes the error handler template with the right parameters (and the right status code for the page)', ->
it.only 'invokes the error handler template with the right parameters (and the right status code for the page)', ->
errorHandler.__set__ 'NODE_ENV', 'development'
errorHandler(@err, {}, @res, {})
@res.status.args[0][0].should.equal 420
@renderStub.render.args[0][0].should.containEql 'desktop/components/error_handler/index.jade'
Expand Down

0 comments on commit cb79d5d

Please sign in to comment.