Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wyze/bs-react-testing-library
BuckleScript bindings for react-testing-library.
https://github.com/wyze/bs-react-testing-library
Last synced: about 2 months ago
JSON representation
BuckleScript bindings for react-testing-library.
- Host: GitHub
- URL: https://github.com/wyze/bs-react-testing-library
- Owner: wyze
- License: mit
- Created: 2018-06-04T16:31:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-14T10:48:59.000Z (over 1 year ago)
- Last Synced: 2024-07-19T00:13:47.979Z (2 months ago)
- Language: Reason
- Homepage: https://yarn.pm/bs-react-testing-library
- Size: 633 KB
- Stars: 36
- Watchers: 4
- Forks: 15
- Open Issues: 16
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Funding: .github/funding.yml
- License: license
Awesome Lists containing this project
- awesome-list - bs-react-testing-library - testing-library. | wyze | 35 | (Reason)
README
# bs-react-testing-library · [![Build Status][actions-image]][actions-url] [![npm][npm-image]][npm-url] [![Codecov][codecov-image]][codecov-url]
> [BuckleScript](//github.com/BuckleScript/bucklescript) bindings for [react-testing-library](//github.com/kentcdodds/react-testing-library).
## Documentation
[**Read the docs**](//testing-library.com/docs/bs-react-testing-library/intro) | [Edit the docs](//github.com/alexkrolick/testing-library-docs)
## Installation
```sh
$ yarn add --dev bs-react-testing-library# or..
$ npm install --save-dev bs-react-testing-library
```## Usage
#### Add to `bsconfig.json`
```json
{
"bs-dev-dependencies": [
"bs-react-testing-library"
]
}
```#### With [`bs-jest`](//github.com/glennsl/bs-jest)
```ocaml
/* Component_test.re */open Jest;
open Expect;
open ReactTestingLibrary;test("Component renders", () =>
{ReasonReact.string("Heading")}
|> render
|> container
|> expect
|> toMatchSnapshot
);
```## Examples
See [`src/__tests__`](src/__tests__) for some examples.
## Development
```sh
$ git clone https://github.com/wyze/bs-react-testing-library.git
$ cd bs-react-testing-library
$ yarn # or `npm install`
```## Build
```sh
$ yarn build
```## Test
```sh
$ yarn test
```## Change Log
> [Full Change Log](changelog.md)
### [v0.8.0](https://github.com/wyze/bs-react-testing-library/releases/tag/v0.8.0) (2020-10-21)
* Upgrade to latest dependencies ([@wyze](https://github.com/wyze) in [#27](https://github.com/wyze/bs-react-testing-library/pull/27))
* Add sponsor button ([@wyze](https://github.com/wyze) in [c69f028](https://github.com/wyze/bs-react-testing-library/commit/c69f028))## License
MIT © [Neil Kistner](https://neilkistner.com)
[actions-image]: https://img.shields.io/github/workflow/status/wyze/bs-react-testing-library/CI.svg?style=flat-square
[actions-url]: https://github.com/wyze/bs-react-testing-library/actions[npm-image]: https://img.shields.io/npm/v/bs-react-testing-library.svg?style=flat-square
[npm-url]: https://npm.im/bs-react-testing-library[codecov-image]: https://img.shields.io/codecov/c/github/wyze/bs-react-testing-library.svg?style=flat-square
[codecov-url]: https://codecov.io/github/wyze/bs-react-testing-library