Files
DeepTutor/web/tests/route-params.test.ts
Bingxi Zhao (Frank) 4b7d24d33e release: v1.2.3 — document attachments, thinking blocks, provider core refactor
- Chat document attachments (PDF/DOCX/XLSX/PPTX) with text extraction
- Reasoning model <think> block display as collapsible cards
- Tri-state send_dimensions toggle for embeddings (#368)
- LLM provider_core module refactor + context_window detection
- Soul template editor (PR #373), Co-Writer save-to-notebook
- Knowledge Base drag-and-drop upload, delete resilience (#370),
  progress persistence, supported-file-types endpoint
- Question generation language fidelity via shared prompt directives
- Settings tour redesign, CLI notebook add-md/replace-md
- Bug fixes: CJK bot name slug, I18nProvider init, Skills default off,
  Moonshot base URL, version badge
- Provider registry: custom_anthropic, thinking_style, alias expansion
- +1900 test lines across 15 new/expanded test files

Made-with: Cursor
2026-04-24 22:36:32 +08:00

17 lines
504 B
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
import { firstParam } from "../lib/route-params";
test("firstParam returns undefined for missing param", () => {
assert.equal(firstParam(undefined), undefined);
});
test("firstParam returns scalar param unchanged", () => {
assert.equal(firstParam("ielts-tutor"), "ielts-tutor");
});
test("firstParam returns first element for catch-all array", () => {
assert.equal(firstParam(["ielts-tutor", "extra"]), "ielts-tutor");
});