From 8955573037dc2d14b58954f5df10c259609daf97 Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:46:04 -0500 Subject: [PATCH] Update settings tests to expect opencode install method argument --- backend/test/routes/settings.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/test/routes/settings.test.ts b/backend/test/routes/settings.test.ts index c229f514..ca46a0e7 100644 --- a/backend/test/routes/settings.test.ts +++ b/backend/test/routes/settings.test.ts @@ -180,7 +180,7 @@ describe('Settings Routes - OpenCode Upgrade', () => { const res = await settingsApp.fetch(req) const json = await res.json() as Record - expect(mockExecSync).toHaveBeenCalledWith('opencode upgrade 2>&1', expect.objectContaining({ + expect(mockExecSync).toHaveBeenCalledWith('opencode upgrade --method curl 2>&1', expect.objectContaining({ timeout: 90000, killSignal: 'SIGKILL' })) @@ -304,7 +304,7 @@ describe('Settings Routes - OpenCode Upgrade', () => { await settingsApp.fetch(req) expect(mockExecSync).toHaveBeenCalledWith( - 'opencode upgrade v1.0.5 2>&1', + 'opencode upgrade v1.0.5 --method curl 2>&1', expect.any(Object) ) }) @@ -322,7 +322,7 @@ describe('Settings Routes - OpenCode Upgrade', () => { await settingsApp.fetch(req) expect(mockExecSync).toHaveBeenCalledWith( - 'opencode upgrade v1.0.5 2>&1', + 'opencode upgrade v1.0.5 --method curl 2>&1', expect.any(Object) ) }) @@ -346,8 +346,8 @@ describe('Settings Routes - OpenCode Upgrade', () => { const json = await res.json() as Record expect(mockExecSync).toHaveBeenCalledWith( - 'opencode upgrade v1.0.5 2>&1', - expect.objectContaining({ timeout: 90000 }) + 'opencode upgrade v1.0.5 --method curl 2>&1', + expect.any(Object) ) expect(mockRestart).toHaveBeenCalled() expect(res.status).toBe(400)