mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
test(test-runtime): cover the archiveSession double's default and stub arms
The default arm builds the next Set outside the immer draft: reading a Set through a draft requires the MapSet plugin, assigning a fresh Set does not.
This commit is contained in:
@@ -199,8 +199,11 @@ export class TestWorkspaces implements IWorkspaces {
|
||||
await (stub(sessionId) as Promise<void>)
|
||||
return
|
||||
}
|
||||
// Built outside the draft: reading a Set through an immer draft needs
|
||||
// the MapSet plugin, while assigning a fresh Set does not.
|
||||
const next = new Set([...this.list.getSnapshot().archivedSessionIds, sessionId])
|
||||
await this.update((draft) => {
|
||||
draft.archivedSessionIds = new Set([...draft.archivedSessionIds, sessionId])
|
||||
draft.archivedSessionIds = next
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user