Testing Library

Testing Library

  • Docs
  • Recipes
  • Help
  • Blog

›Reason Testing Library

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

Reason Testing Library

Bindings for several testing libraries have been ported to ReasonML.

bs-react-testing-library contains BuckleScript bindings for React Testing Library.

bs-dom-testing-library contains BuckleScript bindings for DOM Testing Library.

npm install --save-dev bs-dom-testing-library
npm install --save-dev bs-react-testing-library
  • bs-react-testing-library on GitHub
  • bs-dom-testing-library on GitHub

Setup

After installation, you will need the packages bsconfig.json file like so:

{
  "bs-dev-dependencies": ["bs-react-testing-library"]
}

or

{
  "bs-dev-dependencies": ["bs-dom-testing-library"]
}

Other Dependencies

bs-platform

This is what BuckleScript uses to compile the Reason code to JS. If it is not in your project you can install it like so:

npm install --save-dev bs-platform

bs-jest

This is the recommended test runner and is a wrapper around Jest. All of the examples here will be using it.

  • bs-jest on GitHub
npm install --save-dev @glennsl/bs-jest

Then update bsconfig.json:

{
  "bs-dev-dependencies": ["@glennsl/bs-jest"]
}
Last updated on 6/1/2019
← CheatsheetExamples →
  • Setup
  • Other Dependencies
    • bs-platform
    • bs-jest
Testing Library
Docs
Getting StartedExamplesAPIHelp
Community
BlogStack OverflowDiscord
More
StarGitHubEdit Docs on GitHubHosted by Netlify
Copyright © 2018-2020 Kent C. Dodds and contributors