Fix EventsDB tests

This commit is contained in:
Alex Gleason 2024-03-02 21:46:23 -06:00
parent 2972cb4b6d
commit 7eaa652ae9
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 7 additions and 7 deletions

View File

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