Skip to content
Myr

middleware.basic.js

This file

Path

test/middleware.basic.js

43 lines · 1.2 KiB · JavaScript

Last changed by

Not known.

History of this file

Take it

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

Merge pull request #1073 from Zoramite/lessMiddlewareTJ Holowaychukbefore adoptionf1d759f

lines 1–43why, one step back
1//
2// var express = require('../')3// , request = require('./support/http');4// 5// describe('middleware', function(){6// describe('.next()', function(){7// it('should behave like connect', function(done){8// var app = express()9// , calls = [];10// 11// app.use(function(req, res, next){12// calls.push('one');13// next();14// });15// 16// app.use(function(req, res, next){17// calls.push('two');18// next();19// });20// 21// app.use(function(req, res){22// var buf = '';23// res.setHeader('Content-Type', 'application/json');24// req.setEncoding('utf8');25// req.on('data', function(chunk){ buf += chunk });26// req.on('end', function(){27// res.end(buf);28// });29// });30// 31// request(app)32// .get('/')33// .set('Content-Type', 'application/json')34// .write('{"foo":"bar"}')35// .end(function(res){36// res.headers.should.have.property('content-type', 'application/json');37// res.statusCode.should.equal(200);38// res.body.should.equal('{"foo":"bar"}');39// done();40// })41// })42// })43// })