chai
npmv6.2.2BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
Overview
chai is an npm package that bDD/TDD assertion library for node.js and the browser. Test framework agnostic. The latest version is 6.2.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need bDD/TDD assertion library for node.js and the browser. Test framework agnostic and value a focused solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
Cons
- Large dependency tree (18 direct dependencies) increases install size and audit surface.
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of chai.
Dependencies
Dev (18)
Used by
Popular packages that depend on chai.
An AST-based pattern checker for JavaScript.
Reactive Extensions for modern JavaScript
The postgres client/server binary protocol, implemented in TypeScript
Functions for dealing with a PostgreSQL connection string
Type safe SQL query builder
Leaner CSS
The fastest and simplest library for SQLite in Node.js.
A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3
limits calls to functions that return promises
Robust, expressive, and feature-rich CSS superset
Efficient implementation of Levenshtein algorithm with locale-specific collator support.
yargs the modern, pirate-themed, successor to optimist.
An evented streaming XML parser in JavaScript
A CSS selector engine.
Data library for istanbul coverage objects
istanbul reports
Helper functions for V8 coverage files.
Base reporting library for istanbul
MongoDB connection strings, based on the WhatWG URL API
A bson parser for node.js and the browser
SASLprep: Stringprep Profile for User Names and Passwords, rfc4013
Kerberos library for Node.js
Get the metadata from a Google Cloud Platform environment
[](https://github.com/mongodb-js/zstd/actions/workflows/test.yml)
Alternatives to chai
Jest's expect matchers as a Chai plugin
[](https://github.com/mmkal/expect-type/actions/workflows/ci.yml)  [](ht
Delightful JavaScript Testing.
Delightful JavaScript Testing.
Browser running for Vitest using playwright
Browser running for Vitest using webdriverio
Browser running for Vitest using your browser of choice
Delightful JavaScript Testing.
Next generation testing framework powered by Vite
Node is running but you don't know why? why-is-node-running is here to help you.
Vitest test runner
Vitest module mocker implementation
Frequently installed together
An AST-based pattern checker for JavaScript.
TypeScript definitions for node
Prettier is an opinionated code formatter
TypeScript definitions for chai
The semantic version parser used by npm.
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
the most correct and second fastest glob implementation in JavaScript
Lightweight debugging utility for Node.js and the browser
Lodash modular utilities.
An Esprima-compatible JavaScript parser built on Acorn
ECMAScript JS AST traversal functions
[](https://github.com/mongodb-js/zstd/actions/workflows/test.yml)
Version history
| Version | Published | License |
|---|---|---|
| 6.2.2latest | 6 months ago | MIT |
| 6.2.1 | 8 months ago | MIT |
| 6.2.0 | 9 months ago | MIT |
| 6.1.0 | 9 months ago | MIT |
| 5.3.3 | 11 months ago | MIT |
| 6.0.1 | 11 months ago | MIT |
| 6.0.0 | 11 months ago | MIT |
| 5.3.2 | 11 months ago | MIT |
| 5.3.1 | 11 months ago | MIT |
| 5.3.0 | 11 months ago | MIT |
| 5.2.2 | 11 months ago | MIT |
| 5.2.1 | 1 year ago | MIT |
| 5.2.0 | 1 year ago | MIT |
| 5.1.2 | 1 year ago | MIT |
| 4.5.0 | 2 years ago | MIT |
| 5.1.1 | 2 years ago | MIT |
| 5.1.0 | 2 years ago | MIT |
| 5.0.3 | 2 years ago | MIT |
| 5.0.2 | 2 years ago | MIT |
| 4.4.1 | 2 years ago | MIT |
Maintainers
Frequently asked questions
How do I install chai?
Run `npm install chai` to add chai to your npm project.
What license is chai released under?
chai is distributed under the MIT license.
How popular is chai?
chai has approximately 0 downloads per week and 19 known dependent packages.