Skip to content
Myr

Added failing test for config precedence

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 6bd1371 · 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/express.test.js+24 added
195 unmodified lines
196 assert.response(app,197 { url: '/', method: 'POST', data: 'name=tj', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }},198 { body: 'tj' });199 },200201 'test #configure() precedence': function(assert){202 var app = express.createServer();203204 app.configure(function(){205 app.use(function(req, res, next){206 res.writeHead(200, {});207 res.write('first');208 next();209 });210 app.use(app.router);211 app.use(function(req, res, next){212 res.end('last');213 });214 });215 216 app.get('/', function(req, res){217 res.write(' route ')218 });219220 assert.response(app,221 { url: '/' },222 { body: 'first route last' });223 },224 225 'test #set()': function(assert){226 var app = express.createServer();227 var ret = app.set('title', 'My App').set('something', 'else');
74 unmodified lines