# @drewschrauf/bs-jest-dom

> [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) Reason/BuckleScript bindings.

Latest version **0.1.4** (published 2020-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @drewschrauf/bs-jest-dom
pnpm add @drewschrauf/bs-jest-dom
yarn add @drewschrauf/bs-jest-dom
bun add @drewschrauf/bs-jest-dom
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2020-05-18 |
| First published | 2020-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | drewschrauf |
| Keywords | reason, bucklescript, jest, react |

## Links

- npm: https://www.npmjs.com/package/@drewschrauf/bs-jest-dom
- npm.io page: https://npm.io/package/@drewschrauf/bs-jest-dom

## Dependencies (1)

- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.5.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2020-05-18
- 0.1.3 — 2020-05-03
- 0.1.2 — 2020-05-03

## README

# @drewschrauf/bs-jest-dom

[@testing-library/jest-dom](https://github.com/testing-library/jest-dom) Reason/BuckleScript bindings.

Take a look at some usage [examples](https://github.com/drewschrauf/bs-testing-library/tree/master/packages/examples/__tests__).

## Installation

These bindings are intended to be used with [bs-jest](https://github.com/glennsl/bs-jest). If you don't already have it setup, follow the instructions from its repository.

Once you have bs-jest, Install these bindings as a dev dependency:

```sh
npm install --save-dev @drewschrauf/bs-jest-dom
```

Add it to your bsconfig.json as a dev dependency.

```json
{
  ...
  "bs-dev-dependencies": [
    ...
    "@drewschrauf/bs-jest-dom"
  ]
}
```

It's recommended to add `open JestDom` at the top of each test file.

## API

This documentation covers the specifics of these bindings. To learn about the principles and approach behind Testing Library, refer to the [official documentation](https://testing-library.com/).

All assertions from @testing-library/jest-dom are implemented. Generally you'd pipe a bs-jest expectation into the method like below.

```reason
expect(el) |> toBeInTheDocument
```

If the assertion can take an argument, pass positional and named optional arguments like below:

```reason
expect(el) |> toHaveClass("my-class", ~exact=false)
```

Assertions that can take multiple argument types have been split into multiple assertions. For example, `toHaveClass` and `toHaveClasses` take a `string` and `list(string)` respectively. Refer to the [interface file](https://github.com/drewschrauf/bs-testing-library/blob/master/packages/bs-jest-dom/src/JestDom.rei) for a full list of assertions.

---
_Source: https://npm.io/package/@drewschrauf/bs-jest-dom · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
