diff --git a/src/storages/events-db.test.ts b/src/storages/events-db.test.ts index 32aee80..744935b 100644 --- a/src/storages/events-db.test.ts +++ b/src/storages/events-db.test.ts @@ -28,13 +28,6 @@ Deno.test('insert and filter events', async () => { ); }); -Deno.test('delete events', async () => { - await eventsDB.event(event1); - assertEquals(await eventsDB.query([{ kinds: [1] }]), [event1]); - await eventsDB.remove([{ kinds: [1] }]); - assertEquals(await eventsDB.query([{ kinds: [1] }]), []); -}); - Deno.test('query events with local filter', async () => { await eventsDB.event(event1); @@ -54,6 +47,13 @@ Deno.test('query events with local filter', async () => { assertEquals(await eventsDB.query([{ kinds: [1], local: false }]), []); }); +Deno.test('delete events', async () => { + await eventsDB.event(event1); + assertEquals(await eventsDB.query([{ kinds: [1] }]), [event1]); + await eventsDB.remove([{ kinds: [1] }]); + assertEquals(await eventsDB.query([{ kinds: [1] }]), []); +}); + Deno.test('inserting replaceable events', async () => { assertEquals((await eventsDB.count([{ kinds: [0], authors: [event0.pubkey] }])).count, 0);