Skip to content

Commit

Permalink
clean up test
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Apr 12, 2012
1 parent c0d2c4b commit 6f807b3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/namespace.test.js
Expand Up @@ -152,23 +152,28 @@ module.exports = {
calledA++;
next();
}

function middlewareB(req,res,next){
calledB++;
next();
}

app.namespace('/user/:id', middlewareA, function(){
app.get('/', function(req,res){
res.send('got Home');
});

app.get('/other', function(req,res){
res.send('got Other');
});

app.namespace('/nest', middlewareB, function(req,res){
app.get('/', function(req,res){
res.send('got Nest');
});
});
});

var pending = 3;
function finished() {
--pending || function(){
Expand All @@ -177,6 +182,7 @@ module.exports = {
done();
}();
}

assert.response(app,
{ url: '/user/12' },
{ body: 'got Home' },
Expand Down

0 comments on commit 6f807b3

Please sign in to comment.