Permalink
Browse files

more rigorous shutdown test

  • Loading branch information...
1 parent 01ad1e5 commit 22b203e5cdac5c990c4dde25ca41fa25662535ea @timoxley committed Feb 9, 2012
Showing with 13 additions and 5 deletions.
  1. +13 −5 tests/server.js
View
@@ -75,12 +75,20 @@ describe('server', function() {
done()
})
server.listen(PORT, function() {
- server.shutdown(function() {
- server.shutdown(function() {
- isPortTaken(PORT, function(err, isTaken) {
+ server.shutdown(function(err) {
+ assert.ok(!err)
+ server.shutdown(function(err) {
+ assert.ok(!err)
+ server.shutdown(function(err) {
assert.ok(!err)
- assert.ok(!isTaken)
- done()
+ server.shutdown(function(err) {
+ assert.ok(!err)
+ isPortTaken(PORT, function(err, isTaken) {
+ assert.ok(!err)
+ assert.ok(!isTaken)
+ done()
+ })
+ })
})
})
})

0 comments on commit 22b203e

Please sign in to comment.