update tests

This commit is contained in:
shamb0t
2019-11-19 15:49:12 +00:00
parent 1df3715aa1
commit 69e1591829
4 changed files with 18 additions and 17 deletions

View File

@@ -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)

View File

@@ -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)
})