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"); }); });