id | title |
---|---|
example-intro |
Example |
/* 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
);
You can find more bs-react-testing-library examples at wyze/bs-react-testing-library/src/__tests__.