feat: add source control action to abort merge (#2092)
Co-authored-by: Orca <help@stably.ai> Co-authored-by: brennanb2025 <brennankbenson@gmail.com>
This commit is contained in:
co-authored by
Orca
brennanb2025
parent
a65f7b4216
commit
659fe79226
@@ -38,6 +38,7 @@ vi.mock('fs', () => ({
|
||||
}))
|
||||
|
||||
import {
|
||||
abortMerge,
|
||||
bulkStageFiles,
|
||||
bulkDiscardChanges,
|
||||
bulkUnstageFiles,
|
||||
@@ -647,6 +648,20 @@ describe('getStatus', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('abortMerge', () => {
|
||||
beforeEach(() => {
|
||||
gitExecFileAsyncMock.mockReset()
|
||||
})
|
||||
|
||||
it('runs git merge --abort in the worktree', async () => {
|
||||
gitExecFileAsyncMock.mockResolvedValueOnce({ stdout: '' })
|
||||
|
||||
await abortMerge('/repo')
|
||||
|
||||
expect(gitExecFileAsyncMock).toHaveBeenCalledWith(['merge', '--abort'], { cwd: '/repo' })
|
||||
})
|
||||
})
|
||||
|
||||
describe('getStagedCommitContext', () => {
|
||||
beforeEach(() => {
|
||||
gitExecFileAsyncMock.mockReset()
|
||||
|
||||
Reference in New Issue
Block a user