SDK v2 Phase 6 (1/4): @colineapp/sdk/testing — the app test harness
Radin committed
- Author
- Radin · radin@coline.appAug 10, 2026 at 20:11
- Committer
- Radin · radin@coline.appAug 10, 2026 at 20:11
- Parents
- 5828bb7aeac7
SDK v2 Phase 6 (1/4): @colineapp/sdk/testing — the app test harness createTestWorkspace(app) gives Coline App developers the plan §14.2 loop: a fake workspace implementing the SAME coline.* contract as production, backed by inspectable in-memory state — no network, no database. - invokeTool(name, input): parses through the tool's zod schema and validates result cards against the chat subset, exactly like the platform dispatcher. - renderHome() / renderFileSurface(surface, file, doc): tree render harness; inline surfaces enforce the chat-card subset. - fireSchedule(id, at): runs onSchedule with the app-scoped context; undeclared schedules reject. - State inspection: files (byType/all + documents), kv, records, notifications, index documents, navigation intents, emitted events, net.fetch requests (net calls require an explicit onNetFetch handler so tests never silently reach out). 6 self-tests exercise the harness end to end; sdk suite now 87 green. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5 files changed+640−1