# @ethereum-waffle/chai

> A sweet set of chai matchers for your blockchain testing needs.

Latest version **4.0.10** (published 2023-02-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ethereum-waffle/chai
pnpm add @ethereum-waffle/chai
yarn add @ethereum-waffle/chai
bun add @ethereum-waffle/chai
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.10 |
| Published | 2023-02-15 |
| First published | 2020-01-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10.0 |
| Dependencies | 3 |
| Unpacked size | 461.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 959 |
| Author | Marek Kirejczyk |
| Maintainers | ethworks |
| Keywords | ethereum, smart-contracts, solidity, testing, javascript, typescript, library |

## Links

- npm: https://www.npmjs.com/package/@ethereum-waffle/chai
- Repository: https://github.com/EthWorks/Waffle
- Issues: https://github.com/EthWorks/Waffle/issues
- npm.io page: https://npm.io/package/@ethereum-waffle/chai

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^4.3.4
- [json-bigint](https://npm.io/package/json-bigint.md) ^1.0.0
- [@ethereum-waffle/provider](https://npm.io/package/@ethereum-waffle/provider.md) 4.0.5

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 4.0.10 (latest) — 2023-02-15
- 4.0.10-dev.238c11c (dev) — 2023-10-12
- 4.0.7 (alpha) — 2022-09-16
- 3.0.0-beta.3 (beta) — 2020-06-12
- 4.0.10-dev.efd5f2a — 2023-10-12
- 4.0.10-dev.0915e72 — 2023-02-15
- 4.0.10-dev.4740ec6 — 2023-02-06
- 4.0.9-dev.a1d89d0 — 2023-01-27
- 4.0.9 — 2023-01-27
- 4.0.9-dev.f8ca718 — 2023-01-26
- 4.0.8-dev.13d1af0 — 2023-01-26
- 4.0.8 — 2023-01-26
- 4.0.8-dev.0bc9af4 — 2023-01-26
- 4.0.8-dev.166b72c — 2023-01-26
- 4.0.8-dev.a50814e — 2023-01-24
- … 147 more at https://npm.io/package/@ethereum-waffle/chai/versions

## README

![CI](https://github.com/EthWorks/Waffle/workflows/CI/badge.svg)
[![](https://img.shields.io/npm/v/@ethereum-waffle/chai.svg)](https://www.npmjs.com/package/@ethereum-waffle/chai)

![Ethereum Waffle](https://raw.githubusercontent.com/EthWorks/Waffle/master/docs/source/logo.png)

# @ethereum-waffle/chai

A sweet set of chai matchers for your blockchain testing needs.

## Installation

In the current version of waffle (v2.x.x) you will install this package as a dependency of the main waffle package - `ethereum-waffle`.

```
yarn add --dev ethereum-waffle
npm install --save-dev ethereum-waffle
```

If you want to use this package directly please install it via:
```
yarn add --dev @ethereum-waffle/chai
npm install --save-dev @ethereum-waffle/chai
```

## Usage
```ts
import { expect, use } from "chai";
import { waffleChai } from "@ethereum-waffle/chai";
import { bigNumberify } from "ethers/utils";

use(chaiAsPromised);

expect(bigNumberify("6")).to.be.gt(0);
```

## Feature overview

**NOTE**: You do not need to use this package directly. You can install it through the main package (`ethereum-waffle`) and use it instead.

Read more [in the documentation](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html).

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