Permalink
Browse files

fix test properly!

  • Loading branch information...
1 parent 37cac7e commit 7232659d4f29536f2827242adb92f29b84efafda @dominictarr committed May 28, 2013
Showing with 5 additions and 2 deletions.
  1. +5 −2 test/retrigger.js
View
7 test/retrigger.js
@@ -5,7 +5,7 @@ var Trigger = require('../')
tape('retrigger', function (t) {
- t.plan(2)
+ t.plan(1)
var db = sublevel(level('retrigger'))
var totalDb = db.sublevel('total')
@@ -38,9 +38,12 @@ tape('retrigger', function (t) {
})
})
+ var fin = false
+
db.on('total', function (val) {
console.log('total ==', val, val == 9)
- if(val == 9) {
+ if(val == 9 && !fin) {
+ fin = true
t.ok(true)
t.end()
}

0 comments on commit 7232659

Please sign in to comment.