bs-react-test-renderer

3.0.0 • Public • Published

bs-react-test-renderer

Build Status npm dependencies

BuckleScript bindings for react-test-renderer.

Installation

$ yarn add --dev bs-react-test-renderer
 
# or.. 
 
$ npm install --save-dev bs-react-test-renderer

Usage

Add to bsconfig.json

{
  "bs-dev-dependencies": [
    "bs-react-test-renderer"
  ]
}

With bs-jest

/* Component_test.re */
 
open Jest;
 
describe("Component", () => {
  open ExpectJs;
 
  test("renders", () => {
    let component = ReactShallowRenderer.renderWithRenderer(<Component />);
 
    expect(Js.Undefined.return(component)) |> toBeDefined;
  });
});

Examples

See src/__tests__ for some examples.

For examples with Snapshot testing with bs-jest, see reason-calculator.

Development

$ git clone https://github.com/reasonml-community/bs-react-test-renderer.git
cd bs-react-test-renderer
$ yarn # or `npm install` 

Build

$ yarn build

Test

$ yarn test

Change Log

Full Change Log

v3.0.0 (2020-08-28)

License

MIT © Neil Kistner

Readme

Keywords

none

Package Sidebar

Install

npm i bs-react-test-renderer

Weekly Downloads

137

Version

3.0.0

License

MIT

Unpacked Size

8.9 kB

Total Files

9

Last publish

Collaborators

  • chenglou
  • wyze