From 650079b0c783e28dfcdf29439389037c1632dffc Mon Sep 17 00:00:00 2001 From: "mingholy.lmh" Date: Fri, 21 Nov 2025 18:33:35 +0800 Subject: [PATCH] fix: failed json-output tests --- integration-tests/json-output.test.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/integration-tests/json-output.test.ts b/integration-tests/json-output.test.ts index e6874e01..e1d432db 100644 --- a/integration-tests/json-output.test.ts +++ b/integration-tests/json-output.test.ts @@ -12,13 +12,7 @@ describe('JSON output', () => { beforeEach(async () => { rig = new TestRig(); - await rig.setup('json-output-test', { - settings: { - security: { - authType: 'openai', - }, - }, - }); + await rig.setup('json-output-test'); }); afterEach(async () => { @@ -60,6 +54,7 @@ describe('JSON output', () => { }); it('should return a JSON error for enforced auth mismatch before running', async () => { + const originalOpenaiApiKey = process.env['OPENAI_API_KEY']; process.env['OPENAI_API_KEY'] = 'test-key'; await rig.setup('json-output-auth-mismatch', { settings: { @@ -74,7 +69,7 @@ describe('JSON output', () => { } catch (e) { thrown = e as Error; } finally { - delete process.env['OPENAI_API_KEY']; + process.env['OPENAI_API_KEY'] = originalOpenaiApiKey; } expect(thrown).toBeDefined();