bs-react-test-renderer
BuckleScript bindings for react-test-renderer.
Installation
$ yarn add --dev bs-react-test-renderer
$ npm install --save-dev bs-react-test-renderer
Usage
Add to bsconfig.json
{
"bs-dev-dependencies": [
"bs-react-test-renderer"
]
}
/* 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
Build
$ yarn build
Test
$ yarn test
Change Log
Full Change Log
v1.1.0 (2017-12-14)
- [
63a4beca5c
] - Cleanup project to cut a final release for React 15 support (Neil Kistner) - [
29e4199ea8
] - Turn on super-errors; clean up package.json & bsconfig (Cheng Lou) - [
e09b25baf3
] - package.json: BuckleTypes -> reasonml-community (Glenn Slotte) - [
6b04b13121
] - bump bs-platform version (Cheng Lou) - [
2fffc9f752
] - BuckleTypes -> reasonml-community (Glenn Slotte)
License
MIT © Neil Kistner