chore: refactoring and tests, splitting up files (#12495)

This commit is contained in:
Adam
2026-02-06 10:02:31 -06:00
committed by GitHub
parent a4bc883595
commit 2c58dd6203
117 changed files with 9457 additions and 5827 deletions

View File

@@ -0,0 +1,13 @@
import { describe, expect, test } from "bun:test"
import { workspaceOpenState } from "./sidebar-workspace-helpers"
describe("workspaceOpenState", () => {
test("defaults to local workspace open", () => {
expect(workspaceOpenState({}, "/tmp/root", true)).toBe(true)
})
test("uses persisted expansion state when present", () => {
expect(workspaceOpenState({ "/tmp/root": false }, "/tmp/root", true)).toBe(false)
expect(workspaceOpenState({ "/tmp/branch": true }, "/tmp/branch", false)).toBe(true)
})
})