# @vitest/expect

> Jest's expect matchers as a Chai plugin

Latest version **5.0.3** (published 2026-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vitest/expect
pnpm add @vitest/expect
yarn add @vitest/expect
bun add @vitest/expect
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.0.3 |
| Published | 2026-09-30 |
| First published | 2023-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 105.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Maintainers | ariperkkio, antfu, hiogawa, oreanno, yyx990803 |
| Keywords | vitest, test, chai, assertion |

## Links

- npm: https://www.npmjs.com/package/@vitest/expect
- Repository: https://github.com/vitest-dev/vitest
- Homepage: https://vitest.dev/api/expect
- Issues: https://github.com/vitest-dev/vitest/issues
- Funding: https://opencollective.com/vitest
- npm.io page: https://npm.io/package/@vitest/expect

## Dependencies (6)

- [chai](https://npm.io/package/chai.md) ^6.2.2
- [@types/chai](https://npm.io/package/@types/chai.md) ^5.2.2
- [@vitest/spy](https://npm.io/package/@vitest/spy.md) 5.0.3
- [tinyrainbow](https://npm.io/package/tinyrainbow.md) ^3.1.1
- [@vitest/utils](https://npm.io/package/@vitest/utils.md) 5.0.3
- [@standard-schema/spec](https://npm.io/package/@standard-schema/spec.md) ^1.1.0

## 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
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 5.0.3 (latest) — 2026-09-30
- 5.0.0-rc.4 (rc) — 2026-08-31
- 5.0.0-beta.7 (beta) — 2026-07-24
- 3.2.7 (V3) — 2026-07-06
- 5.0.2 — 2026-09-25
- 5.0.1 — 2026-09-15
- 5.0.0 — 2026-09-03
- 5.0.0-rc.3 — 2026-08-28
- 4.1.11 — 2026-08-18
- 5.0.0-rc.2 — 2026-08-17
- 5.0.0-rc.1 — 2026-08-11
- 5.0.0-beta.6 — 2026-07-06
- 4.1.10 — 2026-07-06
- 5.0.0-beta.5 — 2026-06-15
- 4.1.9 — 2026-06-15
- … 194 more at https://npm.io/package/@vitest/expect/versions

## README

# @vitest/expect

[![NPM version](https://img.shields.io/npm/v/@vitest/expect?color=a1b858&label=)](https://npmx.dev/package/@vitest/expect)

Jest's expect matchers as a Chai plugin.

## Usage

```js
import {
  JestAsymmetricMatchers,
  JestChaiExpect,
  JestExtend,
} from '@vitest/expect'
import * as chai from 'chai'

// allows using expect.extend instead of chai.use to extend plugins
chai.use(JestExtend)
// adds all jest matchers to expect
chai.use(JestChaiExpect)
// adds asymmetric matchers like stringContaining, objectContaining
chai.use(JestAsymmetricMatchers)
```

[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/expect) | [Documentation](https://vitest.dev/api/expect)

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