feat: enhance testing capabilities and introduce new components for question management. Add testing section in AGENTS.md with instructions for running tests and configuring the test environment. Update package.json files to include test scripts and integrate @electric-sql/pglite for in-memory database testing. Introduce CalloutCard and update FilterBar and SoalBrowser components to support visibility filters for private and public questions. Implement new test cases for various functionalities across the application.
92a1d83 | import { describe, expect, it } from "bun:test"; | |
| import { formatLabel } from "../format"; | |
| describe("formatLabel", () => { | |
| it("converts snake_case to Title Case", () => { | |
| expect(formatLabel("multiple_choice")).toBe("Multiple Choice"); | |
| expect(formatLabel("true_false_not_given")).toBe("True False Not Given"); | |
| }); | |
| it("handles single word", () => { | |
| expect(formatLabel("cloze")).toBe("Cloze"); | |
| }); | |
| it("handles empty string", () => { | |
| expect(formatLabel("")).toBe(""); | |
| }); | |
| it("handles already spaced string", () => { | |
| expect(formatLabel("multiple choice")).toBe("Multiple Choice"); | |
| }); | |
| }); | |