Skip to content
Sign in
EvalsExpected vs actualMenu

Expected vs actualPro

Expected and actual output compared field by field.

ProA structured extraction with a changed, a missing and an extra field.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/expected-vs-actual

Usage

tsx
import { ExpectedVsActual } from "@/components/ui/chatcn/pro/expected-vs-actual"

<ExpectedVsActual expected={expected} actual={output} />

A structural diff where key order never counts. Each differing field says Different, Missing or Not expected, with the kit's red and green diff tints and - and + glyphs.

Examples

States

ProExact match, every field shown, and plain text.

Props

PropTypeNotes
expected, actualunknownJSON values or strings
showSamebooleanInclude matching fields

Accessibility

  • A real table with row headers; the verdict is a word, not only a color.