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,16 @@
import { describe, expect, test } from "bun:test"
import { messageIdFromHash } from "./use-session-hash-scroll"
describe("messageIdFromHash", () => {
test("parses hash with leading #", () => {
expect(messageIdFromHash("#message-abc123")).toBe("abc123")
})
test("parses raw hash fragment", () => {
expect(messageIdFromHash("message-42")).toBe("42")
})
test("ignores non-message anchors", () => {
expect(messageIdFromHash("#review-panel")).toBeUndefined()
})
})