BuckleScript bindings for react-test-renderer.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.editorconfig Initial commit Apr 13, 2017
.gitattributes Cleanup project to cut a final release for React 15 support Dec 14, 2017
.gitignore Cleanup project to cut a final release for React 15 support Dec 14, 2017
.travis.yml Cleanup project to cut a final release for React 15 support Dec 14, 2017
README.md
bsconfig.json
changelog.md
license Initial commit Apr 13, 2017
package.json 2.0.0 Dec 14, 2017
yarn.lock Upgrade react-test-renderer (#2) Dec 14, 2017

README.md

bs-react-test-renderer

Build Status npm dependencies devDependencies

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

v2.0.0 (2017-12-14)

  • [7e7404665f] - Upgrade react-test-renderer (#2) (Rolf Erik Lekang)

License

MIT © Neil Kistner