Компоненты
- Accordion
- Alert
- Alert Dialog
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Button
- Calendar
- Card
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Date Picker
- Dialog
- DrawerNew
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Meter
- Number Field
- OTP FieldNew
- Pagination
- Popover
- Preview Card
- Progress
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Toolbar
- Tooltip
AI Components
- AI Components
- Chat Conversation
- Chat Message
- Chat Response
- Chat Suggestion
- Chat Prompt Input
- Chat Attachments
- Chat Code Block
- Chat Image
- Chat Inline Citation
- Chat Reasoning
- Chat Sources
- Chat Actions
- Chat Context
- Chat Loader
- Chat Task
- Chat Tool
- Chat Web Preview
- Chat Snippet
- Chat Terminal
- Chat Stack Trace
- Chat Test Results
- Chat File Tree
- Chat Environment Variables
- Chat Audio Player
- Chat Transcription
- Chat Speech Input
- Chat Mic Selector
- Chat Voice Selector
- Chat Agent
- Chat Persona
- Chat Connection
- Chat Queue
- Chat Checkpoint
- Chat Confirmation
- Chat Artifact
- Chat JSX Preview
- Chat Schema Display
- Chat Package Info
- Chat Commit
- Chat Plan
- Chat Panel
- Chat Open In Chat
- Chat Sandbox
- Chat Model Selector
- Chat Canvas
- Chat Node
- Chat Edge
Resources
Chat Test Results
Результаты test-runner с pass/fail summary, suites и per-test details.
2 failedof 21 tests1.24s
x
signs in with valid credentials42ms
rejects invalid password31ms
rate-limits after 5 attempts180ms
AssertionError: expected 429, got 200
at Object.<anonymous> (auth.test.ts:84:14)
at expect (node_modules/vitest/dist/index.js:32:11)signs up new user
renders user message with right alignment28ms
streams response without flicker520ms
TypeError: streamdown is not a function
at ChatResponse (registry/default/ui/chat-response.tsx:9:5)import {
ChatTest,
ChatTestError,
ChatTestResults,
ChatTestResultsHeader,
ChatTestResultsProgress,
ChatTestResultsSummary,
ChatTestSuite,
} from "@/components/ui/chat-test-results";
export default function Particle() {
return (
<div className="w-full max-w-2xl p-4">
<ChatTestResults
summary={{
passed: 18,
failed: 2,
skipped: 1,
total: 21,
duration: 1240,
}}
>
<ChatTestResultsHeader>
<ChatTestResultsSummary />
</ChatTestResultsHeader>
<ChatTestResultsProgress />
<ChatTestSuite
duration={420}
name="auth.test.ts"
stats={{ passed: 6, failed: 1 }}
>
<ChatTest
duration={42}
name="signs in with valid credentials"
status="passed"
/>
<ChatTest
duration={31}
name="rejects invalid password"
status="passed"
/>
<ChatTest
duration={180}
name="rate-limits after 5 attempts"
status="failed"
>
<ChatTestError>{`AssertionError: expected 429, got 200
at Object.<anonymous> (auth.test.ts:84:14)
at expect (node_modules/vitest/dist/index.js:32:11)`}</ChatTestError>
</ChatTest>
<ChatTest name="signs up new user" status="skipped" />
</ChatTestSuite>
<ChatTestSuite
duration={820}
name="chat-message.test.ts"
stats={{ passed: 12, failed: 1 }}
>
<ChatTest
duration={28}
name="renders user message with right alignment"
status="passed"
/>
<ChatTest
duration={520}
name="streams response without flicker"
status="failed"
>
<ChatTestError>{`TypeError: streamdown is not a function
at ChatResponse (registry/default/ui/chat-response.tsx:9:5)`}</ChatTestError>
</ChatTest>
</ChatTestSuite>
</ChatTestResults>
</div>
);
}
Installation
pnpm dlx shadcn@latest add @jenny/chat-test-results
Usage
import {
ChatTest,
ChatTestError,
ChatTestResults,
ChatTestResultsHeader,
ChatTestResultsProgress,
ChatTestResultsSummary,
ChatTestSuite,
} from "@/components/ui/chat-test-results";
<ChatTestResults
summary={{ passed: 18, failed: 2, skipped: 1, total: 21, duration: 1240 }}
>
<ChatTestResultsHeader>
<ChatTestResultsSummary />
</ChatTestResultsHeader>
<ChatTestResultsProgress />
<ChatTestSuite name="auth.test.ts" stats={{ passed: 8, failed: 1 }} duration={420}>
<ChatTest name="signs in with valid credentials" status="passed" duration={120} />
<ChatTest name="rejects expired token" status="failed">
<ChatTestError>{"expected 401, got 403"}</ChatTestError>
</ChatTest>
<ChatTest name="rate-limits after 5 attempts" status="skipped" />
</ChatTestSuite>
</ChatTestResults>Component map
| Component | Назначение |
|---|---|
ChatTestResults | Корень. Принимает summary: { passed, failed, skipped, total, duration? }. |
ChatTestResultsSummary | Auto-формируемая строка «X failed of N tests · duration». |
ChatTestResultsProgress | Линейный прогресс по (passed + failed + skipped) / total. |
ChatTestSuite | Сворачиваемая группа (файл или describe). Auto-open если есть failed > 0. |
ChatTest | Отдельный тест. status: 'passed' | 'failed' | 'skipped' | 'running' | 'pending'. |
ChatTestError | <pre> с трейсом ошибки внутри <ChatTest status="failed">. |
On This Page