Skip to content

[feature] Migrate to Pure Vitest Testing #74

@hasjack

Description

@hasjack

Overview

Currently using a mix of @testing-library and Vitest for component testing. We should consolidate to use pure Vitest for a more consistent testing approach.

Current Setup

  • Using @testing-library/react for component rendering and queries
  • Using @testing-library/jest-dom for DOM matchers
  • Using @testing-library/user-event for user interactions
  • Using Vitest for test runner and assertions

Required Changes

  1. Remove testing-library packages:

    • @testing-library/dom
    • @testing-library/jest-dom
    • @testing-library/react
    • @testing-library/user-event
  2. Update test files to use Vitest's built-in utilities:

    • Replace testing-library imports with Vitest equivalents
    • Update assertions to use Vitest matchers
    • Update component rendering approach
  3. Update test configuration:

    • Modify vitest.config.ts for React testing setup
    • Ensure proper DOM environment configuration

Files to Update

  • src/components/Race/Race.test.tsx
  • src/components/ERC721/ERC721.test.tsx
  • src/components/Paddock/hooks/useMovement.test.ts
  • src/components/Metamask/Metamask.test.tsx
  • src/components/Menu/Menu.test.tsx
  • src/components/App/App.test.tsx
  • src/components/EthTransactions/EthTransactions.test.tsx
  • src/components/ERC20/ERC20.test.tsx

Benefits

  • Single testing approach
  • Simpler dependency management
  • Better integration with Vitest features
  • Consistent testing patterns across codebase

Metadata

Metadata

Assignees

No one assigned

    Labels

    agents:allTasks and contributions from all Geneva agents

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions