chore: update interface datastore (#663)

* chore: update interface datastore

Updates to v1.x.x to not have multiple versions of this module in the ipfs browser bundle.

* fix: let batch commits complete before continuing tests

Batch commits are async but the tests weren't waiting for them to complete,
mainly because they are triggered by events.

There's no way that I can see of waiting for the batch commit to finish so
I've added delays to the tests. Not great but a start.

* chore: use error log

* test: wait for commit spies to complete

* chore: bump interface-datastore

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
This commit is contained in:
Alex Potsides
2020-06-10 22:39:40 +01:00
committed by GitHub
parent 1e51295150
commit d60a3215d0
3 changed files with 52 additions and 4 deletions

View File

@ -96,7 +96,9 @@ class PersistentPeerStore extends PeerStore {
if (this._dirtyPeers.size >= this.threshold) {
// Commit current data
this._commitData()
this._commitData().catch(err => {
log.error('error committing data', err)
})
}
}
@ -120,7 +122,9 @@ class PersistentPeerStore extends PeerStore {
if (this._dirtyPeers.size >= this.threshold) {
// Commit current data
this._commitData()
this._commitData().catch(err => {
log.error('error committing data', err)
})
}
}