Skip to content
Myr

added .app test for the mounted server as well

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 9865a4c · Browse files · 1 file+9 added−2 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+9 added−2 removed

  • tests:+9 added−2 removed

1 file+9 added−2 removed

modified:test/express.test.js+9 added-2 removed
406 unmodified lines
407 { body: 'hey' });408 },409410 'test .app property after returning control to parent': function() {411 var app = express.createServer();411 var app = express.createServer()412 , blog = express.createServer();413414 // Mounted servers did not restore `req.app` and `res.app` when415 // passing control back to parent via `out()` in `#handle()`.416416 app.use(express.createServer());417 blog.get('/', function(req, res, next){418 req.app.should.equal(blog);419 res.app.should.equal(blog);420 next();421 });422423 app.use(blog);424425 app.use(function(req, res, next) {426 res.send((res.app === app) ? 'restored' : 'not-restored');427 });428
134 unmodified lines