mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 08:23:34 +00:00
Fix tests
This commit is contained in:
3 files changed
+16
-3
No files matched your search
@@ -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)
|
||||
|
||||
@@ -162,6 +162,7 @@ describe('configUtils', () => {
|
||||
origin: 'https://github.com',
|
||||
username: 'user',
|
||||
password: 'token123',
|
||||
proxy: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -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$/),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user