mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
update tests
This commit is contained in:
@@ -161,7 +161,8 @@ Object.keys(testAPIs).forEach(API => {
|
||||
assert.deepEqual(res.payload, expectedOperation)
|
||||
assert.notEqual(res.next, undefined)
|
||||
assert.equal(res.next.length, 1)
|
||||
assert.equal(res.v, 1)
|
||||
assert.equal(res.refs.length, 0)
|
||||
assert.equal(res.v, 2)
|
||||
assert.notEqual(res.clock, undefined)
|
||||
assert.equal(res.clock.time, 2)
|
||||
assert.notEqual(res.key, undefined)
|
||||
|
||||
@@ -45,7 +45,7 @@ Object.keys(testAPIs).forEach(API => {
|
||||
ipfsd = await startIpfs(API, config.daemon1)
|
||||
ipfs = ipfsd.api
|
||||
rmrf.sync(dbPath)
|
||||
|
||||
|
||||
const filterFunc = (src, dest) => {
|
||||
// windows has problems copying these files...
|
||||
return !(src.includes('LOG') || src.includes('LOCK'))
|
||||
@@ -123,7 +123,7 @@ Object.keys(testAPIs).forEach(API => {
|
||||
|
||||
it('allows migrated key to write', async () => {
|
||||
const hash = await db.add({ thing: 'new addition' })
|
||||
const newEntries = db.all.filter(e => e.v === 1)
|
||||
const newEntries = db.all.filter(e => e.v > 0)
|
||||
assert.equal(newEntries.length, 1)
|
||||
assert.strictEqual(newEntries[0].hash, hash)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user