diff --git a/src/hooks/useGit.test.ts b/src/hooks/useGit.test.ts index cd2d4304..669c1447 100644 --- a/src/hooks/useGit.test.ts +++ b/src/hooks/useGit.test.ts @@ -94,7 +94,8 @@ describe('useGit', () => { nostr: mockNostr, corsProxy: 'https://cors.isomorphic-git.org', ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'], - onAuth: expect.any(Function), + credentials: [], + signer: undefined, }); expect(result.current).toEqual({ git: expect.any(Object) }); }); @@ -109,7 +110,8 @@ describe('useGit', () => { nostr: mockNostr, corsProxy: 'https://custom-cors.example.com', ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'], - onAuth: expect.any(Function), + credentials: [], + signer: undefined, }); expect(result.current).toEqual({ git: expect.any(Object) }); }); @@ -124,7 +126,8 @@ describe('useGit', () => { nostr: mockNostr, corsProxy: 'https://cors.isomorphic-git.org', ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'], - onAuth: expect.any(Function), + credentials: [], + signer: undefined, }); // Rerender with a different wrapper (different CORS proxy) diff --git a/src/lib/configUtils.test.ts b/src/lib/configUtils.test.ts index ce6c1ad0..c45b957c 100644 --- a/src/lib/configUtils.test.ts +++ b/src/lib/configUtils.test.ts @@ -162,6 +162,7 @@ describe('configUtils', () => { origin: 'https://github.com', username: 'user', password: 'token123', + proxy: true, }, ], }; diff --git a/src/lib/git.test.ts b/src/lib/git.test.ts index 3049c2ac..eaf91a33 100644 --- a/src/lib/git.test.ts +++ b/src/lib/git.test.ts @@ -70,6 +70,7 @@ describe('Git', () => { expect(mockGit.clone).toHaveBeenCalledWith({ fs, http: expect.any(Object), + onAuth: expect.any(Function), dir: '/test', url: 'https://github.com/user/repo.git', }); @@ -84,6 +85,7 @@ describe('Git', () => { expect(mockGit.clone).toHaveBeenCalledWith({ fs, http: expect.any(Object), + onAuth: expect.any(Function), dir: '/test', url: 'https://gitlab.com/user/repo.git', }); @@ -98,6 +100,7 @@ describe('Git', () => { expect(mockGit.clone).toHaveBeenCalledWith({ fs, http: expect.any(Object), + onAuth: expect.any(Function), dir: '/test', url: 'https://custom.example.com/user/repo.git', }); @@ -112,6 +115,7 @@ describe('Git', () => { expect(mockGit.clone).toHaveBeenCalledWith({ fs, http: expect.any(Object), + onAuth: expect.any(Function), dir: '/test', url: 'http://github.com/user/repo.git', }); @@ -130,6 +134,7 @@ describe('Git', () => { expect(mockGit.getRemoteInfo).toHaveBeenCalledWith({ http: expect.any(Object), + onAuth: expect.any(Function), url: 'https://github.com/user/repo.git', }); }); @@ -141,6 +146,7 @@ describe('Git', () => { expect(mockGit.getRemoteInfo).toHaveBeenCalledWith({ http: expect.any(Object), + onAuth: expect.any(Function), url: 'https://custom.example.com/user/repo.git', }); }); @@ -163,6 +169,7 @@ describe('Git', () => { expect(mockGit.fetch).toHaveBeenCalledWith({ fs, http: expect.any(Object), + onAuth: expect.any(Function), dir: '/test', remote: 'origin', }); @@ -177,6 +184,7 @@ describe('Git', () => { expect(mockGit.fetch).toHaveBeenCalledWith({ fs, http: expect.any(Object), + onAuth: expect.any(Function), dir: '/test', url: 'https://gitlab.com/user/repo.git', }); @@ -231,6 +239,7 @@ describe('Git', () => { expect(mockGit.clone).toHaveBeenCalledWith({ fs, http: expect.any(Object), + onAuth: expect.any(Function), dir: '/test', url: expect.stringMatching(/^https:\/\/(github|gitlab)\.com\/user\/repo\.git$/), });