Skip to content

test(studio): reset storage after test-owned restores - #2214

Merged
kantord merged 1 commit into
mainfrom
studio-reset-storage-after-restores
Oct 8, 2026
Merged

kantord merged 1 commit into
mainfrom
studio-reset-storage-after-restores

Conversation

@kantord

@kantord kantord commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Summary

fixes a small flaky test discovered en passing

The shared reset cleared storage from afterEach, but vitest runs
onTestFinished callbacks after afterEach hooks. A test that restores a
storage spy through spyOnLocalStorage was therefore still spying when the
reset ran, the clear failed, and account-storage stayed quarantined for the
first test of the next file in the worker. It surfaced as an intermittent
chat-workspace.test failure that depended on file adjacency.

The reset now runs from an onTestFinished registered in a beforeEach, which
fires after the test's own restores. A two-test regression covers it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@kantord
kantord marked this pull request as ready for review October 8, 2026 17:19
@kantord
kantord merged commit 6947882 into main Oct 8, 2026
31 checks passed
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 13, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant