bs-react-testing-library ·
BuckleScript bindings for react-testing-library.
Documentation
Installation
$ yarn add --dev bs-react-testing-library # or.. $ npm install --save-dev bs-react-testing-library
Usage
bsconfig.json
Add to
bs-jest
With /* 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
v0.8.0 (2020-10-21)
License
MIT © Neil Kistner