app.all.js
This file
Path
test/app.all.js
35 lines · 687 bytes · JavaScript
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 8ac3e80 point at it.
Merge branch 'master' of github.com:visionmedia/expressTJ Holowaychukbefore adoption8ac3e80
lines 1–35why, one step back12var express = require('../')3 , request = require('./support/http');45describe('app.all()', function(){6 it('should add a router per method', function(done){7 var app = express();89 app.all('/tobi', function(req, res){10 res.end(req.method);11 });1213 request(app)14 .put('/tobi')15 .expect('PUT', function(){16 request(app)17 .get('/tobi')18 .expect('GET', done);19 });20 })2122 it('should ', function(done){23 var app = express()24 , n = 0;2526 app.all('/*', function(req, res, next){27 if (n++) return done(new Error('DELETE called several times'));28 next();29 });3031 request(app)32 .del('/tobi')33 .expect(404, done);34 })35})