From a14ada15e58464c03e2c49aa4cfb8454563cc53e Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sun, 2 Aug 2026 00:48:52 -0700 Subject: [PATCH] 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 --- src/main/azure-devops/pull-request-creation.test.ts | 4 +++- src/main/azure-devops/repository-ref.test.ts | 4 +++- src/main/bitbucket/repository-ref.test.ts | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/azure-devops/pull-request-creation.test.ts b/src/main/azure-devops/pull-request-creation.test.ts index f4a8c2a5c81..02a4b4fb74a 100644 --- a/src/main/azure-devops/pull-request-creation.test.ts +++ b/src/main/azure-devops/pull-request-creation.test.ts @@ -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() }) diff --git a/src/main/azure-devops/repository-ref.test.ts b/src/main/azure-devops/repository-ref.test.ts index 6d3e4e13bc8..4a2a1be1219 100644 --- a/src/main/azure-devops/repository-ref.test.ts +++ b/src/main/azure-devops/repository-ref.test.ts @@ -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() }) diff --git a/src/main/bitbucket/repository-ref.test.ts b/src/main/bitbucket/repository-ref.test.ts index 0b900b21334..603e4fb8a6c 100644 --- a/src/main/bitbucket/repository-ref.test.ts +++ b/src/main/bitbucket/repository-ref.test.ts @@ -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() })