Test result card
Suite-level test results with expandable failures and per-test timing.
Included in the single kansho full pack. Components are not offered as separate installs.
Suite with one failure (expandable)
- createSession › returns a signed JWT48msPass
- verifySession › validates a good token12msPass
- verifySession › returns null on tampered token8msFail
Suite with skipped test
- 0042_sessions › sessions table created120msPass
- 0042_sessions › foreign key to users95msPass
- 0042_sessions › index on expires_at0msSkip
Error & recovery
Static preview: suite and per-test Re-run require host callbacks- createSession › returns a signed JWT48msPass
- verifySession › validates a good token12msPass
- verifySession › returns null on tampered token8msFail
- createSession › returns a signed JWT48msPass
- verifySession › validates a good token12msPass
- verifySession › returns null on tampered token8msFail
All pass
- LoginForm › renders without errors32msPass
- LoginForm › shows validation error on empty email18msPass
- LoginForm › calls onSubmit with trimmed values24msPass
Component documentation
Test Result Card
components/sandbox/test-result-card.tsxPurpose
Summarises a test suite and reveals individual failure details with optional rerun actions.
Appropriate use
Use for read-only test evidence when the host owns execution and recovery.
Example
components/sandbox/test-result-card.tsx has a representative live example in the "Suite with one failure (expandable)" section on /components/test-result-card.
States
Test statuses are pass, fail, and skip; suites may be collapsed or expanded when failures exist, and rerun may target a suite or test.
API and props
TestResultCard accepts suiteName, tests, duration, onRerun, and className; each TestCase supplies name, status, optional duration, optional failureDetail, and optional suite.
Dependencies
Direct imports are React, Lucide icons, StatusPill, duration formatting, and cn.
Accessibility
Failure headers are native disclosure buttons with expanded and controls state; failure details are labelled regions and status is explicit text.
Limitations
It does not run tests, parse output, persist disclosure state, or show pending and failed rerun feedback.
Source
Source: components/sandbox/test-result-card.tsx.
Full pack
components/sandbox/test-result-card.tsx is documented at /components/test-result-card and installs only through the single Kansho full pack; no individual component install is offered.