Skip to content
Myr

Started "helpful 404" support

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 14c479f · Browse files · 3 files+44 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+44 added−4 removed

  • tests:+15 added−3 removed
  • other:+29 added−1 removed

3 files+44 added−4 removed

added:lib/express/pages/not-found.js+28 added
modified:lib/express/pages/show-exceptions.js+1 added-1 removed
modified:spec/spec.routing.js+15 added-3 removed
167 unmodified lines
168 end169 end170 171 describe 'with an unmatchable request path'172 it 'should respond with 404 Not Found'173 get('/something').status.should.eql 404174 get('/something').body.should.eql 'Not Found'172 describe 'with "helpful 404" enabled'173 it 'should show the help html'174 enable('helpful 404')175 get('/something').status.should.eql 500176 get('/something').body.should.include('<h1>Express</h1>')177 get('/something').body.should.include('<h2><em>404</em> Not Found</h2>')178 get('/something').body.should.include("get('/something'")179 end180 end181 182 describe 'with "helpful 404" disabled'183 it 'should respond with 404 Not Found'184 get('/something').status.should.eql 404185 get('/something').body.should.eql 'Not Found'186 end187 end188 end189 190 describe 'with an exception thrown'191 describe 'with "show exceptions" enabled'
45 unmodified lines