bs-react-testing-library

0.8.0 • Public • Published

bs-react-testing-library · Build Status npm Codecov

BuckleScript bindings for react-testing-library.

Documentation

Read the docs | Edit the docs

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.8.0 (2020-10-21)

License

MIT © Neil Kistner

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.8.065latest

Version History

VersionDownloads (Last 7 Days)Published
0.8.065
0.7.31,510
0.7.20
0.7.10
0.7.00
0.6.03
0.5.00
0.4.025
0.3.00
0.2.00
0.1.00

Package Sidebar

Install

npm i bs-react-testing-library

Weekly Downloads

1,603

Version

0.8.0

License

MIT

Unpacked Size

56.3 kB

Total Files

9

Last publish

Collaborators

  • wyze