Skip to content
Myr

added more route tests

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 45f168e · 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/router.test.js+8 added
79 unmodified lines
80 app.get('/user/:id([0-9]{2,10})', function(req, res){81 res.send('user ' + req.params.id);82 });8384 app.post('/pin/save/:lat(\\d+.\\d+)/:long(\\d+.\\d+)', function(req, res){85 res.send(req.params.lat + ' ' + req.params.long);86 });8788 assert.response(app,89 { url: '/pin/save/1.2/3.4', method: 'POST' },90 { body: '1.2 3.4' });9192 assert.response(app,93 { url: '/user/12' },94 { body: 'user 12' });95 96 assert.response(app,
179 unmodified lines