Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 534 Bytes

File metadata and controls

28 lines (22 loc) · 534 Bytes
id title
example-intro
Example

Basic

/* 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
  |> expect
  |> toMatchSnapshot
);

More

You can find more bs-react-testing-library examples at wyze/bs-react-testing-library/src/__tests__.