Fix NostrPublishEventsTool tests by adding missing nip19 mock

This commit is contained in:
Alex Gleason committed 2026-03-06 11:55:50 -06:00
1 parent a063615e86
commit 7a2873aefb
1 file changed
+9
@@ -11,6 +11,15 @@ vi.mock('nostr-tools', () => ({
id: 'test-event-id-1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
sig: 'test-signature-1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
})),
nip19: {
decode: vi.fn((value: string) => {
if (value.startsWith('nsec1')) {
return { type: 'nsec', data: new Uint8Array(32).fill(2) };
}
throw new Error('Invalid nip19 value');
}),
nsecEncode: vi.fn(() => 'nsec1testkey'),
},
}));
// Mock NPool to avoid actual network calls