# reason-jest

> Minimal bindings for Jest

Latest version **3.0.0** (published 2024-10-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install reason-jest
pnpm add reason-jest
yarn add reason-jest
bun add reason-jest
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

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

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2024-10-17 |
| First published | 2020-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Allen Nelson |
| Maintainers | adnelson |

## Links

- npm: https://www.npmjs.com/package/reason-jest
- Repository: https://github.com/adnelson/re-jest
- Homepage: https://github.com/adnelson/re-jest#readme
- Issues: https://github.com/adnelson/re-jest/issues
- npm.io page: https://npm.io/package/reason-jest

## Recent versions

- 3.0.0 (latest) — 2024-10-17
- 2.2.2 — 2024-05-16
- 2.2.1 — 2020-08-25
- 2.2.0 — 2020-08-09
- 2.1.0 — 2020-08-02
- 2.0.0 — 2020-07-29
- 1.4.0 — 2020-07-27
- 1.3.0 — 2020-07-21
- 1.2.0 — 2020-07-18
- 1.1.1 — 2020-07-15
- 1.1.0 — 2020-07-15

## README

# re-jest

## Jest bindings in ReasonML

This is a set of bindings to `jest` in ReasonML, It aims to be simpler to use than `bs-jest`, with most functions returning `unit`, enabling a developer to write their tests with the same approach they would take writing them in JavaScript, but without needing to leave the type safety of ReasonML.

```reason
describe("myTests", () => {
  test("numbers", () => {
    let myNumber = 123;
    expect(myNumber)->toBeGreaterThan(100);
    expect(myNumber)->not->toBeLessThanOrEqual(1);

    // It also works for floats...
    expect(myNumber->float_of_int)->toBeLessThan(124.0);
  });

  testAsync("promises", () => {
    expect(Js.Promise.resolve(123))->resolves->toEqual(123);
  });

  test("arrays", () => {
    expect([|1, 2, 3, 4, 5|])->toContain(4);
  });

  // Still working on this one...
  Skip.test("billion dollar idea generator",
    () =>
      expect(generateBillionDollarCompany()->valuation)
      ->toBeGreaterThan(1000000000)
  );
});
```

## Stability

Very much a work in progress, but nonetheless it can do enough to test plenty of existing code.

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