mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Add missing types to testApp
This commit is contained in:
parent
9c97cc387f
commit
07b68b71d2
1 changed files with 12 additions and 3 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue