@rescriptbr/testing-library
v1.0.0
Published
ReScript bindings for react-testing-library
Downloads
3
Readme
@rescriptbr/react-testing-library ·
ReScript bindings for react-testing-library.
Documentation
The documentions is WIP, see src/__tests__
for some examples.
Installation
$ yarn add --dev @rescriptbr/react-testing-library
# or..
$ npm install --save-dev @rescriptbr/react-testing-library
Usage
Add to bsconfig.json
{
"bs-dev-dependencies": [
"@rescriptbr/react-testing-library"
]
}
With bs-jest
open Jest
open Expect
open ReactTestingLibrary
test("Component renders", () =>
<div style=ReactDOM.Style.make(~color="rebeccapurple", ())>
<h1> {React.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
v1.0.0 (2021-04-21)
- Fix package version (@vmarcosp in 5ad5ce0)
- Updating changelog (@vmarcosp in d6b6178)
- Update readme.md (@vmarcosp in 40b2af2)
- Update ci.yml (@vmarcosp in ddf3986)
- Update readme.md (@vmarcosp in e70df4d)
- Updating deno version on ci (@vmarcosp in 4ac7cc6)
- Removing unused files (@vmarcosp in 3b0c09f)
- Migrating from reason syntax to rescript and reason-react to @rescript/react (@vmarcosp in f77a430)
License
MIT ©