mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
fix(test): restore Azure DevOps and Bitbucket remote-url probe assertions (#12080)
#12065 started passing an AbortSignal as a third argument to provider.exec in readRemoteUrl, and updated the Gitea, GitHub and GitLab assertions to match. Azure DevOps and Bitbucket were missed, so main is red on three test files. Same expect.any(AbortSignal) shape #12065 used for the other providers. Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -130,7 +130,9 @@ describe('Azure DevOps pull request creation', () => {
|
||||
ok: true,
|
||||
number: 38
|
||||
})
|
||||
expect(remoteGit.exec).toHaveBeenCalledWith(['remote', 'get-url', 'origin'], '/remote/repo')
|
||||
expect(remoteGit.exec).toHaveBeenCalledWith(['remote', 'get-url', 'origin'], '/remote/repo', {
|
||||
signal: expect.any(AbortSignal)
|
||||
})
|
||||
expect(gitExecFileAsyncMock).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
|
||||
@@ -118,7 +118,9 @@ describe('parseAzureDevOpsRepoRef', () => {
|
||||
webBaseUrl: 'https://dev.azure.com/acme/Project/_git/repo'
|
||||
})
|
||||
|
||||
expect(sshExecMock).toHaveBeenCalledWith(['remote', 'get-url', 'origin'], '/repo')
|
||||
expect(sshExecMock).toHaveBeenCalledWith(['remote', 'get-url', 'origin'], '/repo', {
|
||||
signal: expect.any(AbortSignal)
|
||||
})
|
||||
expect(gitExecFileAsyncMock).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
|
||||
@@ -157,7 +157,9 @@ describe('Bitbucket repository refs', () => {
|
||||
repoSlug: 'project'
|
||||
})
|
||||
|
||||
expect(sshExecMock).toHaveBeenCalledWith(['remote', 'get-url', 'origin'], '/repo')
|
||||
expect(sshExecMock).toHaveBeenCalledWith(['remote', 'get-url', 'origin'], '/repo', {
|
||||
signal: expect.any(AbortSignal)
|
||||
})
|
||||
expect(gitExecFileAsyncMock).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user