Skip to content
Myr

Added catchall test

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent dc24694 · Browse files · 1 file+8 added−0 removed
This commit

State

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

Diff stats

1 file+8 added−0 removed

  • tests:+8 added−0 removed

1 file+8 added−0 removed

modified:test/express.test.js+8 added
44 unmodified lines
45 46 server.post('/staff/:id', function(req, res){47 res.send('POST Staff ' + req.staff.id);48 });49 50 server.all('*', function(req, res){51 res.send('requested ' + req.url);52 });5354 assert.response(server,55 { url: '/' },56 { body: 'wahoo' });
16 unmodified lines
73 74 assert.response(server,75 { url: '/staff/12', method: 'POST' },76 { body: 'POST Staff 12' });77 78 assert.response(server,79 { url: '/foo/bar/baz', method: 'DELETE' },80 { body: 'requested /foo/bar/baz' });81 },82 83 'test constructor middleware': function(assert, beforeExit){84 var calls = [];
336 unmodified lines