Skip to content

Commit e9ba367

Browse files
committed
Fix bug in test_database
The function named "finished" hid the variable of the same name.
1 parent 9b09552 commit e9ba367

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_database.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ exports.test = function(sql, assert, done) {
4747
count++;
4848
if (count === 1) assert.deepEqual(row, {a:1,b:'a'}, 'db.each returns the correct 1st row');
4949
if (count === 2) assert.deepEqual(row, {a:2,b:'b'}, 'db.each returns the correct 2nd row');
50-
}, function finished () {
50+
}, function last () {
5151
finished = true;
52-
assert.ok(count === 2, "db.each returns the right number of rows");
53-
done();
52+
assert.strictEqual(count, 2, "db.each returns the right number of rows");
5453
});
5554
var timeout = setTimeout(function timeout(){
56-
assert.ok(finished === true, "db.each should call its last callback after having returned the rows");
55+
assert.strictEqual(finished, true,
56+
"db.each should call its last callback after having returned the rows");
5757
done();
5858
}, 3000);
5959
};

0 commit comments

Comments
 (0)