Fix EventsDB tests
This commit is contained in:
parent
2972cb4b6d
commit
7eaa652ae9
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue