Testing Library

Test UI components the way users interact with them

Testing Library is a family of packages for testing DOM and component code by querying elements the way users find them, such as by role, label, or text. It has bindings for React, Vue, Angular, Svelte, and plain DOM, and works with Jest or Vitest.

Key features

  • Accessible queries by role, label, and text
  • user-event for realistic interactions
  • Bindings for React, Vue, Angular, Svelte, and more
  • Works with Jest and Vitest

Similar tools

  • Vitest

    Next-generation testing framework powered by Vite

    FreeOpen sourceCLI, VS Code
  • Jest

    Delightful JavaScript testing framework with a focus on simplicity

    FreeOpen sourceCLI, VS Code
  • Playwright

    Reliable end-to-end testing and browser automation for modern web apps

    by MicrosoftFreeOpen sourceCLI, macOS, Windows +2
  • Mock Service Worker

    API mocking at the network level for browser and Node.js

    FreeOpen sourceCLI, Web
  • Cypress

    JavaScript end-to-end and component testing that runs in the browser

    by Cypress.ioFreemiumOpen sourceCLI, macOS, Windows +1
  • Faker

    Generate massive amounts of realistic fake data for testing and development

    FreeOpen sourceCLI, Web

Built a tool like Testing Library? Submit it for review