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 d9cee90 · Browse files · 1 file+32 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+32 added−0 removed

  • tests:+32 added−0 removed

1 file+32 added−0 removed

modified:test/router.test.js+32 added
72 unmodified lines
73 calls.should.equal(3);74 });75 },7677 'test precedence': function(){78 var app = express.createServer();7980 var hits = [];8182 app.all('*', function(req, res, next){83 hits.push('all');84 next();85 });8687 app.get('/foo', function(req, res, next){88 hits.push('GET /foo');89 next();90 });91 92 app.get('/foo', function(req, res, next){93 hits.push('GET /foo2');94 next();95 });9697 app.put('/foo', function(req, res, next){98 hits.push('PUT /foo');99 next();100 });101102 assert.response(app,103 { url: '/foo' },104 function(){105 hits.should.eql(['all', 'GET /foo', 'GET /foo2']);106 });107 },108109 'test named capture groups': function(){110 var app = express.createServer();111112 app.get('/user/:id([0-9]{2,10})', function(req, res){
222 unmodified lines