Merge pull request #1013 from deepseek-harness/fix/node26-vitest-webstorage

fix(test): isolate jsdom storage on Node 26
This commit is contained in:
Turtle
2026-07-31 10:31:59 +08:00
committed by GitHub
15 changed files with 119 additions and 12 deletions

View File

@@ -44,9 +44,7 @@ afterEach(cleanup)
// The chat store persists under its declared key; clear so one case's active
// view cannot rehydrate into the next.
beforeEach(() => {
// Node 22+ exposes an experimental localStorage global that is undefined
// without --localstorage-file; only clear when a real Storage is present.
if (typeof localStorage !== 'undefined') localStorage.clear()
localStorage.clear()
})
/** Node fixture: user prologue, two turns, one tool result inside turn 1. */