Skip to content
Browse files

Whoops, this is issue #10, and tighten it up a bit

  • Loading branch information...
1 parent 4dc3393 commit 198c201be473ae66620346c9e9f9e8ed3ab3ed86 @jhs jhs committed Feb 3, 2012
Showing with 5 additions and 9 deletions.
  1. +5 −9 test/issues/10.js
View
14 test/issues/10.js
@@ -11,18 +11,14 @@ var lib = require('../../lib')
couch.setup(test)
-test('Issue #9', function(t) {
+test('Issue #10', function(t) {
follow({db:couch.DB, inactivity_ms:30000}, function(er, change) {
console.error('Change: ' + JSON.stringify(change))
- if(change.seq == 1)
- return // Let it run through once, just for fun.
+ if(change.seq == 2)
+ this.stop()
- //t.equal(change.seq, 2, 'The second change will be the last')
- this.stop()
-
- setTimeout(finish, 250)
- function finish() {
+ this.on('stop', function() {
t.end()
- }
+ })
})
})

0 comments on commit 198c201

Please sign in to comment.
Something went wrong with that request. Please try again.