Testing Library

Testing Library

  • Docs
  • Recipes
  • Help
  • Blog

›Ecosystem

Getting Started

  • Introduction
  • Guiding Principles
  • Using Fake Timers

Frameworks

    DOM Testing Library

    • Introduction
    • Install
    • Example
    • Setup
    • Queries
    • Firing Events
    • Async Utilities
    • Helpers
    • Configuration
    • FAQ
    • Cheatsheet

    React Testing Library

    • Introduction
    • Example
    • Setup
    • API
    • Migrate from Enzyme
    • FAQ
    • Cheatsheet

    Reason Testing Library

    • Introduction
    • Examples

    React Native Testing Library

    • Introduction
    • Example
    • Setup

    Vue Testing Library

    • Introduction
    • Examples
    • Setup
    • API
    • Cheatsheet
    • FAQ

    Marko Testing Library

    • Introduction
    • Setup
    • API

    Angular Testing Library

    • Introduction
    • Examples
    • API

    Preact Testing Library

    • Introduction
    • Example
    • API
    • Learn

    Svelte Testing Library

    • Introduction
    • Setup
    • Example
    • API
  • Cypress Testing Library
  • Puppeteer Testing Library
  • Testcafe Testing Library
  • Nightwatch Testing Library

Ecosystem

  • user-event
  • jest-dom
  • bs-jest-dom
  • jest-native
  • react-select-event
  • eslint-plugin-testing-library
  • eslint-plugin-jest-dom
  • riot-testing-library
  • jasmine-dom
Edit

riot-testing-library

riot-testing-library builds on top of DOM Testing Library by adding APIs for working with Riot.js components.

npm install --save-dev riot-testing-library
import render, { fireEvent } from 'riot-testing-library'
import TestTag from './test.tag'

test('should show count text  when rendered', () => {
  const { queryByTestId } = render(TestTag, { count: 10 })
  expect(queryByTestId('count').textContent).toBe('10')
})

test('should add count when click add button text', () => {
  const { queryByTestId } = render(TestTag, { count: 1 })
  expect(queryByTestId('count').textContent).toBe('1')
  fireEvent.click(queryByTestId('button'))
  expect(queryByTestId('count').textContent).toBe('2')
})
  • riot-testing-library on GitHub
Last updated on 7/31/2020
← eslint-plugin-jest-domjasmine-dom →
Testing Library
Docs
Getting StartedExamplesAPIHelp
Community
BlogStack OverflowDiscord
More
StarGitHubEdit Docs on GitHubHosted by Netlify
Copyright © 2018-2020 Kent C. Dodds and contributors