Skip to content

Commit

Permalink
Made tests clarer, took a poke around.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Mar 21, 2013
1 parent 51e3acf commit 6e1dfc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/dirty/dirty.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ Dirty.prototype._load = function() {
});

this._writeStream.on('drain', function() {

self._writeDrain();
});
};
Expand Down
10 changes: 8 additions & 2 deletions test/node_v0.10.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,15 @@ else {
});
});

it('should trigger the callback for each of 10 db calls', function(cb) {
it('should work again as long as a fresh connection is used', function(cb) {
connectToDiskDb(function (count, db) {
async.eachSeries(_.range(10),function (i,cb) {
setSample(db,cb);
});
});

it('callback should fire each time if set() is used multiple times over the same db connection', function(cb) {
connectToDiskDb(function (count, db) {
async.eachSeries(_.range(2),function (i,cb) {
setSample(db, cb);
}, cb);
});
Expand Down

0 comments on commit 6e1dfc8

Please sign in to comment.