Files
Jyotisha/frontend/tests/chat-message-actions.test.ts
T
Jesse_Chen 7d667fecbf fix(consult): treat pinched answers as failed and restore reply actions
Incomplete Flash generations were billed as completed consultations. Fail
those runs, keep the partial text, and reuse the rectification like/copy/rerun
bar on ordinary chat replies.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 19:40:50 +08:00

12 lines
499 B
TypeScript

import assert from "node:assert/strict";
import test from "node:test";
import { toggleChatMessageFeedback } from "../src/components/chat-message-actions.tsx";
test("message feedback is mutually exclusive and can be cleared", () => {
assert.equal(toggleChatMessageFeedback(undefined, "up"), "up");
assert.equal(toggleChatMessageFeedback("up", "up"), undefined);
assert.equal(toggleChatMessageFeedback("up", "down"), "down");
assert.equal(toggleChatMessageFeedback("down", "up"), "up");
});