test(plugin-market): isolate Git probe call assertions

This commit is contained in:
creatixchu committed 2026-10-30 13:58:35 +08:00
1 parent dec3a642df
commit 2361eaebec
1 file changed
+1 -1
@@ -157,7 +157,7 @@ it('reports an unreachable host as a network failure, a failed local command as
expect(readdirSync(join(root, 'cache'))).toEqual([])
const other = repository('t2', { 'README.md': 'x' })
// A real 1 ms deadline can expire during either the version probe or a later Git command.
const probe = vi.spyOn(subprocess, 'execa').mockResolvedValueOnce({
const probe = vi.spyOn(subprocess, 'execa').mockClear().mockResolvedValueOnce({
failed: true, shortMessage: 'Command timed out: git --version', stdout: '', stderr: '', isMaxBuffer: false,
} as Awaited<ReturnType<typeof subprocess.execa>>)
try {