sharedb 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/test/milestone-db.js +8 -4
package/package.json
CHANGED
package/test/milestone-db.js
CHANGED
|
@@ -576,8 +576,10 @@ module.exports = function(options) {
|
|
|
576
576
|
});
|
|
577
577
|
|
|
578
578
|
it('only stores even-numbered versions', function(done) {
|
|
579
|
-
|
|
580
|
-
|
|
579
|
+
var snapshotCount = 0;
|
|
580
|
+
db.on('save', function() {
|
|
581
|
+
snapshotCount++;
|
|
582
|
+
if (snapshotCount < 2) return;
|
|
581
583
|
|
|
582
584
|
async.waterfall([
|
|
583
585
|
db.getMilestoneSnapshot.bind(db, 'books', 'catcher-in-the-rye', 1),
|
|
@@ -619,8 +621,10 @@ module.exports = function(options) {
|
|
|
619
621
|
callback();
|
|
620
622
|
});
|
|
621
623
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
+
var snapshotCount = 0;
|
|
625
|
+
db.on('save', function() {
|
|
626
|
+
snapshotCount++;
|
|
627
|
+
if (snapshotCount < 2) return;
|
|
624
628
|
|
|
625
629
|
async.waterfall([
|
|
626
630
|
db.getMilestoneSnapshot.bind(db, 'books', 'catcher-in-the-rye', 1),
|