mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +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,
|
nostr: mockNostr,
|
||||||
corsProxy: 'https://cors.isomorphic-git.org',
|
corsProxy: 'https://cors.isomorphic-git.org',
|
||||||
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
||||||
onAuth: expect.any(Function),
|
credentials: [],
|
||||||
|
signer: undefined,
|
||||||
});
|
});
|
||||||
expect(result.current).toEqual({ git: expect.any(Object) });
|
expect(result.current).toEqual({ git: expect.any(Object) });
|
||||||
});
|
});
|
||||||
@@ -109,7 +110,8 @@ describe('useGit', () => {
|
|||||||
nostr: mockNostr,
|
nostr: mockNostr,
|
||||||
corsProxy: 'https://custom-cors.example.com',
|
corsProxy: 'https://custom-cors.example.com',
|
||||||
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
||||||
onAuth: expect.any(Function),
|
credentials: [],
|
||||||
|
signer: undefined,
|
||||||
});
|
});
|
||||||
expect(result.current).toEqual({ git: expect.any(Object) });
|
expect(result.current).toEqual({ git: expect.any(Object) });
|
||||||
});
|
});
|
||||||
@@ -124,7 +126,8 @@ describe('useGit', () => {
|
|||||||
nostr: mockNostr,
|
nostr: mockNostr,
|
||||||
corsProxy: 'https://cors.isomorphic-git.org',
|
corsProxy: 'https://cors.isomorphic-git.org',
|
||||||
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
||||||
onAuth: expect.any(Function),
|
credentials: [],
|
||||||
|
signer: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Rerender with a different wrapper (different CORS proxy)
|
// Rerender with a different wrapper (different CORS proxy)
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ describe('configUtils', () => {
|
|||||||
origin: 'https://github.com',
|
origin: 'https://github.com',
|
||||||
username: 'user',
|
username: 'user',
|
||||||
password: 'token123',
|
password: 'token123',
|
||||||
|
proxy: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ describe('Git', () => {
|
|||||||
expect(mockGit.clone).toHaveBeenCalledWith({
|
expect(mockGit.clone).toHaveBeenCalledWith({
|
||||||
fs,
|
fs,
|
||||||
http: expect.any(Object),
|
http: expect.any(Object),
|
||||||
|
onAuth: expect.any(Function),
|
||||||
dir: '/test',
|
dir: '/test',
|
||||||
url: 'https://github.com/user/repo.git',
|
url: 'https://github.com/user/repo.git',
|
||||||
});
|
});
|
||||||
@@ -84,6 +85,7 @@ describe('Git', () => {
|
|||||||
expect(mockGit.clone).toHaveBeenCalledWith({
|
expect(mockGit.clone).toHaveBeenCalledWith({
|
||||||
fs,
|
fs,
|
||||||
http: expect.any(Object),
|
http: expect.any(Object),
|
||||||
|
onAuth: expect.any(Function),
|
||||||
dir: '/test',
|
dir: '/test',
|
||||||
url: 'https://gitlab.com/user/repo.git',
|
url: 'https://gitlab.com/user/repo.git',
|
||||||
});
|
});
|
||||||
@@ -98,6 +100,7 @@ describe('Git', () => {
|
|||||||
expect(mockGit.clone).toHaveBeenCalledWith({
|
expect(mockGit.clone).toHaveBeenCalledWith({
|
||||||
fs,
|
fs,
|
||||||
http: expect.any(Object),
|
http: expect.any(Object),
|
||||||
|
onAuth: expect.any(Function),
|
||||||
dir: '/test',
|
dir: '/test',
|
||||||
url: 'https://custom.example.com/user/repo.git',
|
url: 'https://custom.example.com/user/repo.git',
|
||||||
});
|
});
|
||||||
@@ -112,6 +115,7 @@ describe('Git', () => {
|
|||||||
expect(mockGit.clone).toHaveBeenCalledWith({
|
expect(mockGit.clone).toHaveBeenCalledWith({
|
||||||
fs,
|
fs,
|
||||||
http: expect.any(Object),
|
http: expect.any(Object),
|
||||||
|
onAuth: expect.any(Function),
|
||||||
dir: '/test',
|
dir: '/test',
|
||||||
url: 'http://github.com/user/repo.git',
|
url: 'http://github.com/user/repo.git',
|
||||||
});
|
});
|
||||||
@@ -130,6 +134,7 @@ describe('Git', () => {
|
|||||||
|
|
||||||
expect(mockGit.getRemoteInfo).toHaveBeenCalledWith({
|
expect(mockGit.getRemoteInfo).toHaveBeenCalledWith({
|
||||||
http: expect.any(Object),
|
http: expect.any(Object),
|
||||||
|
onAuth: expect.any(Function),
|
||||||
url: 'https://github.com/user/repo.git',
|
url: 'https://github.com/user/repo.git',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -141,6 +146,7 @@ describe('Git', () => {
|
|||||||
|
|
||||||
expect(mockGit.getRemoteInfo).toHaveBeenCalledWith({
|
expect(mockGit.getRemoteInfo).toHaveBeenCalledWith({
|
||||||
http: expect.any(Object),
|
http: expect.any(Object),
|
||||||
|
onAuth: expect.any(Function),
|
||||||
url: 'https://custom.example.com/user/repo.git',
|
url: 'https://custom.example.com/user/repo.git',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -163,6 +169,7 @@ describe('Git', () => {
|
|||||||
expect(mockGit.fetch).toHaveBeenCalledWith({
|
expect(mockGit.fetch).toHaveBeenCalledWith({
|
||||||
fs,
|
fs,
|
||||||
http: expect.any(Object),
|
http: expect.any(Object),
|
||||||
|
onAuth: expect.any(Function),
|
||||||
dir: '/test',
|
dir: '/test',
|
||||||
remote: 'origin',
|
remote: 'origin',
|
||||||
});
|
});
|
||||||
@@ -177,6 +184,7 @@ describe('Git', () => {
|
|||||||
expect(mockGit.fetch).toHaveBeenCalledWith({
|
expect(mockGit.fetch).toHaveBeenCalledWith({
|
||||||
fs,
|
fs,
|
||||||
http: expect.any(Object),
|
http: expect.any(Object),
|
||||||
|
onAuth: expect.any(Function),
|
||||||
dir: '/test',
|
dir: '/test',
|
||||||
url: 'https://gitlab.com/user/repo.git',
|
url: 'https://gitlab.com/user/repo.git',
|
||||||
});
|
});
|
||||||
@@ -231,6 +239,7 @@ describe('Git', () => {
|
|||||||
expect(mockGit.clone).toHaveBeenCalledWith({
|
expect(mockGit.clone).toHaveBeenCalledWith({
|
||||||
fs,
|
fs,
|
||||||
http: expect.any(Object),
|
http: expect.any(Object),
|
||||||
|
onAuth: expect.any(Function),
|
||||||
dir: '/test',
|
dir: '/test',
|
||||||
url: expect.stringMatching(/^https:\/\/(github|gitlab)\.com\/user\/repo\.git$/),
|
url: expect.stringMatching(/^https:\/\/(github|gitlab)\.com\/user\/repo\.git$/),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user