From fdbff75e1e9def6fc458901c12deef75480af438 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Tue, 10 Nov 2026 17:10:45 -0800 Subject: [PATCH] Format the keyless Gemini voice tests (#1660) --- src/voice/geminiSession.test.mjs | 14 ++++++++++---- src/voice/providerCommands.test.mjs | 11 +++++++++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/voice/geminiSession.test.mjs b/src/voice/geminiSession.test.mjs index a97b5caac..3c91d3a0a 100644 --- a/src/voice/geminiSession.test.mjs +++ b/src/voice/geminiSession.test.mjs @@ -3641,16 +3641,22 @@ test('cancelling a queued globe reset also skips its dependent rotation', async test('a missing server key reaches the error state flagged, other token failures do not', async () => { for (const [body, missingKey] of [ - [{ error: 'Add a Gemini API key in Provider Settings', code: 'API_KEY_MISSING' }, true], + [ + { + error: 'Add a Gemini API key in Provider Settings', + code: 'API_KEY_MISSING', + }, + true, + ], [{ error: 'Gemini quota is unavailable. Try again later.' }, undefined], ]) { const h = harness({ fetchImpl: async () => Response.json(body, { status: 503 }), }); await h.c.start(); - const error = h.events.filter( - (event) => event.type === 'state' && event.state === 'error', - ).at(-1); + const error = h.events + .filter((event) => event.type === 'state' && event.state === 'error') + .at(-1); assert.equal(error?.detail, body.error); assert.equal(error?.missingKey, missingKey); assert.equal(h.sockets.length, 0); diff --git a/src/voice/providerCommands.test.mjs b/src/voice/providerCommands.test.mjs index b2fed2721..dcc38d6c5 100644 --- a/src/voice/providerCommands.test.mjs +++ b/src/voice/providerCommands.test.mjs @@ -884,9 +884,16 @@ test('a missing-key error hides the microphone hint; other errors keep it', asyn detail: 'Add a Gemini API key in Provider Settings', missingKey: true, }); - assert.equal(ui.state.error.text, 'Add a Gemini API key in Provider Settings'); + assert.equal( + ui.state.error.text, + 'Add a Gemini API key in Provider Settings', + ); assert.equal(ui.state.error.hint, false); - instance.hooks.emit({ type: 'state', state: 'error', detail: 'Socket closed' }); + instance.hooks.emit({ + type: 'state', + state: 'error', + detail: 'Socket closed', + }); assert.equal(ui.state.error.text, 'Socket closed'); assert.equal(ui.state.error.hint, true); });