Skip to content
Myr

tests: add lone "*" route tests

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

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent acc4a61 · Browse files · 1 file+24 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+24 added−0 removed

  • tests:+24 added−0 removed

1 file+24 added−0 removed

modified:test/app.router.js+24 added
561 unmodified lines
562 .expect('users from 1 to 50', done);563 })564565 describe('*', function(){566 it('should capture everything', function (done) {567 var app = express()568569 app.get('*', function (req, res) {570 res.end(req.params[0])571 })572573 request(app)574 .get('/user/tobi.json')575 .expect('/user/tobi.json', done)576 })577578 it('should decore the capture', function (done) {579 var app = express()580581 app.get('*', function (req, res) {582 res.end(req.params[0])583 })584585 request(app)586 .get('/user/tobi%20and%20loki.json')587 .expect('/user/tobi and loki.json', done)588 })589590 it('should denote a greedy capture group', function(done){591 var app = express();592593 app.get('/user/*.json', function(req, res){
465 unmodified lines