Created
February 21, 2014 11:38
-
-
Save daleharvey/9132869 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('changes are not duplicated', function (done) { | |
var db = new PouchDB(dbs.name); | |
var called = 0; | |
var changes = db.changes({ | |
since: 'latest', | |
continuous: true, | |
onChange: function () { | |
called++; | |
} | |
}); | |
db.put({_id: 'adoc', key: 'value'}); | |
setTimeout(function () { | |
called.should.equal(1); | |
changes.cancel(); | |
done(); | |
}, 1000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment