evOo-local/apps/web/src/components/AskCard.test.tsx
cynarAI 6c7eed7580 Initial clean evOo-local from f00577b
Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline
(Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/*
packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
2026-09-20 17:15:16 +02:00

18 lines
546 B
TypeScript

import { selectedAskActionLabel } from "@rakazo/core";
import { describe, expect, it } from "vitest";
describe("selectedAskActionLabel", () => {
it("maps a choice answer id to its user-facing label", () => {
expect(
selectedAskActionLabel("choice-2", [
{ id: "choice-1", label: "Berlin" },
{ id: "choice-2", label: "Seoul" },
]),
).toBe("Seoul");
});
it("falls back to the answer when an action is unavailable", () => {
expect(selectedAskActionLabel("custom", undefined)).toBe("custom");
});
});