Skip to content

Add unit tests for ErrorBoundary and StreamingErrorBoundary components #4

Description

@kanweiwei

The error boundary components (web/components/error/ErrorBoundary.tsx) have no tests.

What to do:

  1. Read ErrorBoundary.tsx to understand the component API
  2. Create web/components/error/__tests__/ErrorBoundary.test.tsx
  3. Test cases to cover:
    • Renders children when no error
    • Shows fallback UI when child throws
    • Custom fallback prop is used
    • onError callback is called
    • Reset button clears the error state
    • StreamingErrorBoundary renders with retry button
  4. Run: pnpm -C web run test -- --run components/error

Skills needed: React testing, Vitest + React Testing Library

Reference: See existing component tests at web/components/agent/__tests__/ConversationView.empty-state.test.tsx

Estimated time: 2-3 hours

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions