test(terminal): align resume retirement expectations

This commit is contained in:
Brennan Benson
2026-08-26 23:18:22 -07:00
parent 29c44cdb05
commit 74c2ba8c57
5 changed files with 5 additions and 5 deletions
@@ -752,6 +752,6 @@ describe('connectPanePty', () => {
)
expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledTimes(1)
expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledWith(2, 'restored')
expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey)
expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey])
})
})
@@ -332,7 +332,7 @@ describe('connectPanePty', () => {
expect(deps.clearTabPtyId).toHaveBeenCalledWith('tab-1', 'restored-session')
expect(deps.syncPanePtyLayoutBinding).not.toHaveBeenCalledWith(2, 'restored-session')
expect(deps.syncPanePtyLayoutBinding).toHaveBeenCalledWith(2, 'fresh-resume-pty')
expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey)
expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey])
expect(window.api.pty.clearPendingPaneSerializer).toHaveBeenCalledWith(paneKey, 1)
} finally {
globalThis.setTimeout = originalSetTimeout
@@ -369,7 +369,7 @@ describe('connectPanePty', () => {
deferredSpawn.resolve('pty-resumed')
await flushAsyncTicks()
expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey)
expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey])
})
it('re-arms the exact hibernation target after a replacement spawn fails', async () => {
@@ -394,7 +394,7 @@ describe('connectPanePty', () => {
expect(deps.updateTabPtyId).toHaveBeenCalledWith('tab-1', freshPtyId)
expect(window.api.pty.reportRendererSerializerReady).toHaveBeenCalledWith(freshPtyId)
expect(transport.sendInput).not.toHaveBeenCalled()
expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey)
expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey])
})
it('does not let a restored encoded PTY override the current worktree owner', async () => {
@@ -244,7 +244,7 @@ describe('connectPanePty', () => {
expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledTimes(1)
expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledWith(2, 'restored')
expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey)
expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey])
})
it('says the fresh-spawn resume started fresh when main declined it', async () => {