From 1ae9da5793449441edec838a0cb4dbe01c0d4930 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 22 Feb 2025 21:26:23 -0600 Subject: [PATCH] Fix hydrate tests --- packages/ditto/storages/hydrate.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ditto/storages/hydrate.test.ts b/packages/ditto/storages/hydrate.test.ts index 6ba4870b..fa14d50d 100644 --- a/packages/ditto/storages/hydrate.test.ts +++ b/packages/ditto/storages/hydrate.test.ts @@ -2,6 +2,7 @@ import { DittoConf } from '@ditto/conf'; import { DummyDB } from '@ditto/db'; import { MockRelay } from '@nostrify/nostrify/test'; import { assertEquals } from '@std/assert'; +import { generateSecretKey, nip19 } from 'nostr-tools'; import { DittoEvent } from '@/interfaces/DittoEvent.ts'; import { hydrateEvents } from '@/storages/hydrate.ts'; @@ -162,7 +163,7 @@ Deno.test('hydrateEvents(): zap sender, zap amount, zapped post // kind 9735 --- function setupTest() { const db = new DummyDB(); - const conf = new DittoConf(new Map()); + const conf = new DittoConf(new Map([['DITTO_NSEC', nip19.nsecEncode(generateSecretKey())]])); const relay = new MockRelay(); return { conf, db, relay };