test(desktop): fix session preview registry tests fails

clearing the registry sets localstorage values, so we must clear it
afterwards
This commit is contained in:
ethernet 2026-07-08 19:51:50 -04:00
parent 6016997a72
commit 0fac4cd8e9
2 changed files with 4 additions and 4 deletions

View file

@ -62,9 +62,9 @@ describe('usePreviewRouting', () => {
$currentCwd.set('/work')
$messages.set([])
$previewTarget.set(null)
window.localStorage.clear()
clearSessionPreviewRegistry()
handleEvent = () => undefined
window.localStorage.clear()
Object.defineProperty(window, 'hermesDesktop', {
configurable: true,
@ -78,9 +78,9 @@ describe('usePreviewRouting', () => {
cleanup()
$messages.set([])
$previewTarget.set(null)
window.localStorage.clear()
clearSessionPreviewRegistry()
vi.restoreAllMocks()
clearSessionPreviewRegistry()
window.localStorage.clear()
})
it('opens the active session preview from the registry', async () => {

View file

@ -48,8 +48,8 @@ describe('preview store', () => {
$previewServerRestart.set(null)
$activeSessionId.set(null)
$selectedStoredSessionId.set(null)
window.localStorage.clear()
clearSessionPreviewRegistry()
window.localStorage.clear()
})
it('does not notify status subscribers for restart progress text', () => {