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:
@@ -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 () => {
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user