Skip to content
Myr

more 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 ff2242d · Browse files · 1 file+16 added−2 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+16 added−2 removed

  • tests:+16 added−2 removed

1 file+16 added−2 removed

modified:test/app.router.js+16 added-2 removed
207 unmodified lines
208 describe('*', function(){209 it('should denote a greedy capture group', function(done){210 var app = express();211212 app.get('/user/*', function(req, res){212 app.get('/user/*.json', function(req, res){213 res.end(req.params[0]);214 });215216 request(app)217 .get('/user/tj')217 .get('/user/tj.json')218 .expect('tj', done);219 })220 221 it('should work with several', function(done){222 var app = express();223224 app.get('/api/*.*', function(req, res){225 var resource = req.params.shift()226 , format = req.params.shift();227 res.end(resource + ' as ' + format);228 });229230 request(app)231 .get('/api/users/0.json')232 .expect('users/0 as json', done);233 })234 235 it('should span multiple segments', function(done){236 var app = express();237238 app.get('/file/*', function(req, res){
99 unmodified lines