mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Refactor ProjectsManager.cloneProject to accept an options object
This commit is contained in:
4 files changed
+26
-6
No files matched your search
@@ -457,7 +457,10 @@ describe('ProjectsManager', () => {
|
||||
Object.assign(projectsManager, { git: mockGit });
|
||||
|
||||
// Attempt to clone a project
|
||||
await expect(projectsManager.cloneProject('test-project', 'https://github.com/test/repo.git'))
|
||||
await expect(projectsManager.cloneProject({
|
||||
name: 'test-project',
|
||||
repoUrl: 'https://github.com/test/repo.git',
|
||||
}))
|
||||
.rejects.toThrow('Clone failed');
|
||||
|
||||
// Verify that the project directory was cleaned up
|
||||
@@ -488,7 +491,10 @@ describe('ProjectsManager', () => {
|
||||
|
||||
try {
|
||||
// Attempt to clone a project
|
||||
await expect(projectsManager.cloneProject('test-project', 'https://github.com/test/repo.git'))
|
||||
await expect(projectsManager.cloneProject({
|
||||
name: 'test-project',
|
||||
repoUrl: 'https://github.com/test/repo.git',
|
||||
}))
|
||||
.rejects.toThrow('Clone failed');
|
||||
|
||||
// Should have logged a cleanup warning
|
||||
|
||||
Reference in new issue
Block a user