Skip to content
Myr

Add tests for dynamic mounting.

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

authored by Blake Embrey · committed by Blake Embrey · parent be52dbb · Browse files · 3 files+42 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

3 files+42 added−0 removed

  • tests:+42 added−0 removed

3 files+42 added−0 removed

modified:test/app.route.js+13 added
modified:test/app.use.js+15 added
modified:test/Router.js+14 added
28 unmodified lines
2930 router.handle({ url: '/foo/bar', method: 'GET' }, { done: done });31 });3233 it('should support dynamic routes', function(done){34 var router = new Router();35 var another = new Router();3637 another.get('/:bar', function(req, res){38 req.params.foo.should.equal('test');39 req.params.bar.should.equal('route');40 res.end();41 });42 router.use('/:foo', another);4344 router.handle({ url: '/test/route', method: 'GET' }, { end: done });45 });4647 describe('.handle', function(){48 it('should dispatch', function(done){49 var router = new Router();50
120 unmodified lines