From a0952bc4c1f4695162765f6c8ec931a051cbf3c1 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 29 Jul 2024 16:42:18 -0500 Subject: [PATCH] zap-split.test: use using --- src/utils/zap-split.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils/zap-split.test.ts b/src/utils/zap-split.test.ts index 08454160..33a8023e 100644 --- a/src/utils/zap-split.test.ts +++ b/src/utils/zap-split.test.ts @@ -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);