This commit is contained in:
Raven Scott
2026-05-20 17:13:51 -04:00
parent 3507e4e91a
commit 7f086aa591
190 changed files with 34732 additions and 746 deletions
+3 -2
View File
@@ -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')