Updates
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const test = require('bare-test')
|
||||
require('bare-process/global')
|
||||
const test = require('brittle')
|
||||
const HyperP2PTemporalIndex = require('../index.js')
|
||||
const crypto = require('bare-crypto')
|
||||
const b4a = require('b4a')
|
||||
@@ -40,7 +41,7 @@ test('hyper-p2p-temporal-index - nearest query and expiry/prune', async (t) => {
|
||||
const now = Date.now()
|
||||
|
||||
const ev1 = await index.insertEvent({ v: 1 }, { timestamp: now - 200 })
|
||||
const ev2 = await index.insertEvent({ v: 2 }, { timestamp: now })
|
||||
const ev2 = await index.insertEvent({ v: 2 }, { timestamp: now - 100 })
|
||||
|
||||
const nearest = await index.queryNearest(now - 50, { direction: 'before' })
|
||||
t.ok(nearest, 'found nearest before')
|
||||
|
||||
Reference in New Issue
Block a user