Fix type errors and tests

This commit is contained in:
Alex Gleason committed 2025-12-31 10:25:27 -06:00
1 parent 638b2dd1b8
commit 6839f50a48
4 files changed
+16 -8

No files matched your search

-3
View File
@@ -55,7 +55,6 @@ describe('Lightning Payment', () => {
provider={mockProvider}
onUpdate={() => {}}
onRemove={() => {}}
initialTab="credits"
/>
</TestApp>
);
@@ -81,7 +80,6 @@ describe('Lightning Payment', () => {
provider={mockProvider}
onUpdate={() => {}}
onRemove={() => {}}
initialTab="credits"
/>
</TestApp>
);
@@ -101,7 +99,6 @@ describe('Lightning Payment', () => {
provider={mockProvider}
onUpdate={() => {}}
onRemove={() => {}}
initialTab="credits"
/>
</TestApp>
);
-1
View File
@@ -741,7 +741,6 @@ export function OnboardingDialog({ open, onOpenChange }: OnboardingDialogProps)
}}
onUpdate={() => {}}
onRemove={() => {}}
initialTab="credits"
/>
)}
</>
-1
View File
@@ -285,7 +285,6 @@ function QuillyCreditsButton({ provider }: QuillyCreditsButtonProps) {
provider={provider}
onUpdate={() => {}}
onRemove={() => {}}
initialTab="credits"
/>
</>
);
+16 -3
View File
@@ -1,8 +1,21 @@
import { describe, it, expect, beforeEach } from 'vitest';
import { describe, it, expect, beforeEach, vi } from 'vitest';
import { MockFS } from '@/test/MockFS';
import { Git } from '@/lib/git';
import { GitLogCommand } from './log';
import { NPool } from '@nostrify/nostrify';
import type { NPool, NostrEvent } from '@nostrify/nostrify';
const createMockNostr = (): NPool => {
const events: NostrEvent[] = [];
return {
req: vi.fn(),
query: vi.fn(async () => events),
event: vi.fn(async (event: NostrEvent) => { events.push(event); }),
group: vi.fn().mockReturnValue({ query: vi.fn(async () => events) }),
relay: vi.fn(),
relays: new Map(),
close: vi.fn(),
} as unknown as NPool;
};
describe('GitLogCommand', () => {
let fs: MockFS;
@@ -13,7 +26,7 @@ describe('GitLogCommand', () => {
fs = new MockFS();
git = new Git({
fs,
nostr: new NPool(),
nostr: createMockNostr(),
});
logCommand = new GitLogCommand({ git, fs });