Skip to content
BuckleScript bindings for react-testing-library.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.editorconfig
.gitattributes
.gitignore
.travis.yml
bsconfig.json
changelog.md
license
package.json
readme.md
yarn.lock

readme.md

bs-react-testing-library

Build Status npm Coveralls

BuckleScript bindings for react-testing-library.

Installation

$ yarn add --dev bs-react-testing-library

# or..

$ npm install --save-dev bs-react-testing-library

Usage

Add to bsconfig.json

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

With bs-jest

/* Component_test.re */

open Jest;
open Expect;
open ReactTestingLibrary;

test("Component renders", () =>
  <div style=ReactDOMRe.Style.make(~color="rebeccapurple", ())>
    <h1> {ReasonReact.string("Heading")} </h1>
  </div>
  |> render
  |> container
  |> expect
  |> toMatchSnapshot
);

Examples

See src/__tests__ for some examples.

Development

$ git clone https://github.com/wyze/bs-react-testing-library.git
$ cd bs-react-testing-library
$ yarn # or `npm install`

Build

$ yarn build

Test

$ yarn test

Change Log

Full Change Log

v0.4.0 (2018-10-11)

  • [0ce29af4d8] - Remove non-functioning Simulate module (Neil Kistner)
  • [7b2350237a] - Upgrade dependencies and expose FireEvent from bs-dom-testing-library (Neil Kistner)

License

MIT © Neil Kistner

You can’t perform that action at this time.