Skip to content
Myr

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 dacad53 · Browse files · 1 file+9 added−1 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+9 added−1 removed

  • tests:+9 added−1 removed

1 file+9 added−1 removed

modified:test/express.test.js+9 added-1 removed
585 unmodified lines
586 app.get('/user/:id/:op?', function(){});587 app.put('/user/:id', function(){});588 app.get('/user/:id/edit', function(){});589590 var route = app.get('/user/:id')[0]590 app.get('/user')[0].should.be.an.instanceof(Route);591 route.should.be.an.instanceof(Route);592 route.callback.should.be.a('function');593 route.path.should.equal('/user/:id');594 route.regexp.should.be.an.instanceof(RegExp);595 route.method.should.equal('GET');596 route.index.should.equal(1);597 route.keys.should.eql(['id']);598599 app.get('/user').should.have.length(1);600 app.get('/user/:id').should.have.length(1);601 app.get('/user/:id/:op?').should.have.length(1);602 app.put('/user/:id').should.have.length(1);
30 unmodified lines