Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

test(settings): follow the voice reset into run-settings-reset

purple71211b647d00
diff --git a/src/components/settings/__tests__/speech-abschnitt-und-probe.test.ts b/src/components/settings/__tests__/speech-abschnitt-und-probe.test.ts
index a467833b..b9a49bc9 100644
--- a/src/components/settings/__tests__/speech-abschnitt-und-probe.test.ts
+++ b/src/components/settings/__tests__/speech-abschnitt-und-probe.test.ts
@@ -143,7 +143,11 @@ describe('AS-09: der Abschnitt ist ausgezogen, nicht nur verschoben', () => {
// Seite bei jedem Schreibvorgang im Voice-Store neu rendern — auch beim
// Tippen in ein Feld eines anderen Tabs.
expect(PAGE).not.toContain('const voiceSettings = useVoiceStore()')
- expect(PAGE).toContain('useVoiceStore((s) => s.resetVoiceDefaults)')
+ expect(PAGE).not.toMatch(/useVoiceStore\(\s*\)/)
+ // Since B2 the reset reads the action once when it fires, through
+ // getState() in lib/run-settings-reset.ts, and subscribes to nothing.
+ expect(readFileSync(resolve(__dirname, '../../../lib/run-settings-reset.ts'), 'utf8'))
+ .toContain('useVoiceStore.getState().resetVoiceDefaults()')
})
it('der Zeilenschalter steht einmal, nicht zweimal', () => {