How to add Unit Tests to Vite Project? React Unit Testing Tutorial with Testing Library and Vitest

Поділитися
Вставка
  • Опубліковано 1 лют 2025

КОМЕНТАРІ •

  • @abinvarkey2331
    @abinvarkey2331 10 днів тому +1

    thanks)

  • @DevWebApp
    @DevWebApp  5 місяців тому

    ⌚Timestamps:
    0:34 Instalingl dependencies (vitest @testing-library/react)
    1:15 Updating vite.config.js
    1:37 Creating tests/setup.js
    2:17 Updating scripts section in package.json
    3:07 Creating .spec.jsx file for unit test
    4:40 Adding 'describe' section
    6:20 First unit test. Checking that the component renders correctly
    8:45 Running unit tests with commands 'vitest run' and 'vitest' watch mode