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
@@ -0,0 +1,22 @@
import { describe, expect, test } from "bun:test"
import { questionSubtitle } from "./session-prompt-helpers"
describe("questionSubtitle", () => {
const t = (key: string) => {
if (key === "ui.common.question.one") return "question"
if (key === "ui.common.question.other") return "questions"
return key
}
test("returns empty for zero", () => {
expect(questionSubtitle(0, t)).toBe("")
})
test("uses singular label", () => {
expect(questionSubtitle(1, t)).toBe("1 question")
})
test("uses plural label", () => {
expect(questionSubtitle(3, t)).toBe("3 questions")
})
})