mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
zap-split.test: use using
This commit is contained in:
parent
37f229408c
commit
a0952bc4c1
1 changed files with 5 additions and 2 deletions
|
|
@ -6,7 +6,8 @@ import { getZapSplits } from '@/utils/zap-split.ts';
|
|||
import { getTestDB } from '@/test.ts';
|
||||
|
||||
Deno.test('Get zap splits in DittoZapSplits format', async () => {
|
||||
const { store } = await getTestDB();
|
||||
await using db = await getTestDB();
|
||||
const store = db.store;
|
||||
|
||||
const sk = generateSecretKey();
|
||||
const pubkey = getPublicKey(sk);
|
||||
|
|
@ -19,6 +20,7 @@ Deno.test('Get zap splits in DittoZapSplits format', async () => {
|
|||
['p', '0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd', '3', 'Alex creator of Ditto'],
|
||||
],
|
||||
}, sk);
|
||||
|
||||
await store.event(event);
|
||||
|
||||
const eventFromDb = await store.query([{ kinds: [30078], authors: [pubkey] }]);
|
||||
|
|
@ -36,7 +38,8 @@ Deno.test('Get zap splits in DittoZapSplits format', async () => {
|
|||
});
|
||||
|
||||
Deno.test('Zap split is empty', async () => {
|
||||
const { store } = await getTestDB();
|
||||
await using db = await getTestDB();
|
||||
const store = db.store;
|
||||
|
||||
const sk = generateSecretKey();
|
||||
const pubkey = getPublicKey(sk);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue