Fix grasp tests

This commit is contained in:
Alex Gleason committed 2025-12-21 01:06:11 -06:00
1 parent 8b9d87b5d5
commit 91130cbd89
2 files changed
+3 -5

No files matched your search

-2
View File
@@ -1,6 +1,5 @@
import { useState, useEffect } from 'react';
import { Plus, X, Server } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { Button } from '@/components/ui/button';
import { Label } from '@/components/ui/label';
import { Input } from '@/components/ui/input';
@@ -10,7 +9,6 @@ import { useNostrPublish } from '@/hooks/useNostrPublish';
import { toast } from '@/hooks/useToast';
export function GraspListManager() {
const { t } = useTranslation();
const { config, updateConfig } = useAppContext();
const { user } = useCurrentUser();
const { mutate: publishEvent } = useNostrPublish();
+3 -3
View File
@@ -92,7 +92,7 @@ describe('useGit', () => {
fs: mockFS,
nostr: mockNostr,
corsProxy: 'https://cors.isomorphic-git.org',
graspMetadata: { relays: [{ url: 'wss://git.shakespeare.diy/' }, { url: 'wss://relay.ngit.dev/' }], updatedAt: 0 },
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
});
expect(result.current).toEqual({ git: expect.any(Object) });
});
@@ -106,7 +106,7 @@ describe('useGit', () => {
fs: mockFS,
nostr: mockNostr,
corsProxy: 'https://custom-cors.example.com',
graspMetadata: { relays: [{ url: 'wss://git.shakespeare.diy/' }, { url: 'wss://relay.ngit.dev/' }], updatedAt: 0 },
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
});
expect(result.current).toEqual({ git: expect.any(Object) });
});
@@ -120,7 +120,7 @@ describe('useGit', () => {
fs: mockFS,
nostr: mockNostr,
corsProxy: 'https://cors.isomorphic-git.org',
graspMetadata: { relays: [{ url: 'wss://git.shakespeare.diy/' }, { url: 'wss://relay.ngit.dev/' }], updatedAt: 0 },
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
});
// Rerender with a different wrapper (different CORS proxy)