test(desktop): give the toolset-config-panel @/hermes mock the config-origin helpers

VoiceProviderFields now reads useHermesConfigRecord, which pulls
peekConfigReadOrigin/retainConfigReadOrigin from the '@/hermes' barrel. The
panel test's hand-rolled '@/hermes' mock predates those exports, so the two
TTS-row tests threw "No peekConfigReadOrigin export is defined on the mock"
and timed out. Provide inert stubs (no origin, identity retain); the panel
tests are not about write routing. Blank-line padding fixed by eslint --fix.
This commit is contained in:
kshitijk4poor
2026-09-21 21:12:50 +05:30
committed by kshitij
parent 8403fd1166
commit 6aef2e3bdd

View File

@@ -49,6 +49,9 @@ const saveHermesConfigRecord = vi.fn()
const getElevenLabsVoices = vi.fn()
vi.mock('@/hermes', () => ({
// useHermesConfigRecord (via VoiceProviderFields) reads these from the barrel.
peekConfigReadOrigin: () => undefined,
retainConfigReadOrigin: (next: unknown) => next,
getToolsetConfig: (name: string) => getToolsetConfig(name),
getToolsetModels: (name: string, provider?: string) => getToolsetModels(name, provider),
selectToolsetModel: (name: string, model: string, provider?: string) => selectToolsetModel(name, model, provider),