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.
18 lines
546 B
TypeScript
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");
|
|
});
|
|
});
|