Skip to content
Myr

app.all.js

This file

Path

test/app.all.js

35 lines · 682 bytes · JavaScript

Last changed by

remove unnecessary test/support/httpJonathan Ongbefore adoption328c6d3

History of this file

Take it

The walk stopped after 200 commits: lines older than a10f695 point at it.

pin jade dev dep so tests do not breakTJ Holowaychukbefore adoptiona10f695

lines 1–2why, one step back
1
2var express = require('../')

remove unnecessary test/support/httpJonathan Ongbefore adoption328c6d3

line 3why, one step back
3 , request = require('supertest');

pin jade dev dep so tests do not breakTJ Holowaychukbefore adoptiona10f695

lines 4–35why, one step back
4
5describe('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})