test(pipeline): refactor to use createTestDB instead of getTestDB

This commit is contained in:
P. Reis 2024-07-05 17:48:34 -03:00
parent f380120cd3
commit 34bbf6e39a

View file

@ -1,11 +1,11 @@
import { assertEquals } from '@std/assert'; import { assertEquals } from '@std/assert';
import { generateSecretKey } from 'nostr-tools'; import { generateSecretKey } from 'nostr-tools';
import { genEvent, getTestDB } from '@/test.ts'; import { createTestDB, genEvent, getTestDB } from '@/test.ts';
import { handleZaps } from '@/pipeline.ts'; import { handleZaps } from '@/pipeline.ts';
Deno.test('store one zap receipt in nostr_events; convert it into event_zaps table format and store it', async () => { Deno.test('store one zap receipt in nostr_events; convert it into event_zaps table format and store it', async () => {
await using db = await getTestDB(); await using db = await createTestDB();
const kysely = db.kysely; const kysely = db.kysely;
const sk = generateSecretKey(); const sk = generateSecretKey();