From 07b68b71d2dc5ad138e95e879ebdbbb6cad0e488 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 21 Feb 2025 21:31:42 -0600 Subject: [PATCH] Add missing types to testApp --- packages/mastoapi/test.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/mastoapi/test.ts b/packages/mastoapi/test.ts index 70a5e1af..78753511 100644 --- a/packages/mastoapi/test.ts +++ b/packages/mastoapi/test.ts @@ -1,13 +1,22 @@ import { DittoConf } from '@ditto/conf'; -import { DummyDB } from '@ditto/db'; +import { type DittoDB, DummyDB } from '@ditto/db'; import { DittoApp, type DittoMiddleware } from '@ditto/router'; -import { type NostrSigner, NSecSigner } from '@nostrify/nostrify'; +import { type NostrSigner, type NRelay, NSecSigner } from '@nostrify/nostrify'; import { MockRelay } from '@nostrify/nostrify/test'; import { generateSecretKey, nip19 } from 'nostr-tools'; import type { User } from '@ditto/mastoapi/middleware'; -export function testApp() { +export function testApp(): { + app: DittoApp; + relay: NRelay; + conf: DittoConf; + db: DittoDB; + user: { + signer: NostrSigner; + relay: NRelay; + }; +} { const db = new DummyDB(); const nsec = nip19.nsecEncode(generateSecretKey());