</>PackageGraphPackageGraph

chai

npmv6.2.2

BDD/TDD assertion library for node.js and the browser. Test framework agnostic.

Safe to adopt

Yes — chai scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 261 days ago. 14 releases in the last 2 years.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • BMaintenance: grade B, Good.

    Last published 261 days ago. 14 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 143 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding chai to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

143 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=18
Module format
ESM only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the chai README.

<script src="./node_modules/chai/index.js" type="module"></script>

chai vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
chaithis page057MIT8 months ago
expect-type78.4M8Apache-2.01 day ago
@vitest/expect01MIT1 day ago
assertion-error89.6M2MIT1 day ago
jest42.1M70MIT1 day ago
@jest/core02MIT1 day ago

Dependencies

Declared by chai v6.2.2. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (18)

@eslint/js ^9.17.0@rollup/plugin-commonjs ^29.0.0@web/dev-server-rollup ^0.6.1@web/test-runner ^0.20.0@web/test-runner-playwright ^0.11.0assertion-error ^2.0.1c8 ^10.1.3check-error ^2.1.1deep-eql ^5.0.1esbuild ^0.27.0eslint ^9.0.0eslint-plugin-jsdoc ^61.0.0globals ^16.3.0loupe ^3.1.0mocha ^11.0.0pathval ^2.0.0prettier ^3.4.2typescript ~5.9.0

Used by

Popular packages that depend on chai.

cliuinpm

easily create complex multi-column command-line-interfaces

212.4M/wk1 dependentsISC
yargs-parsernpm

the mighty option parser used by yargs

178.8M/wk2 dependentsISC
node-fetchnpm

A light-weight module that brings Fetch API to node.js

172.9M/wk9 dependentsMITTS
estraversenpm

ECMAScript JS AST traversal functions

158.3M/wk4 dependentsBSD-2-Clause
eslintnpm

An AST-based pattern checker for JavaScript.

138.4M/wk279 dependentsMITTS
y18nnpm

the bare-bones internationalization library used by yargs

126.1M/wk1 dependentsISC
diffnpm

A JavaScript text diff implementation.

124.1M/wk4 dependentsBSD-3-ClauseTS
vitestnpm

Next generation testing framework powered by Vite

92.7M/wk129 dependentsMITTS
rxjsnpm

Reactive Extensions for modern JavaScript

90.9M/wk6 dependentsApache-2.0TS
ajv-keywordsnpm

Additional JSON-Schema keywords for Ajv JSON validator

61.4M/wk1 dependentsMITTS
istanbul-lib-source-mapsnpm

Source maps support for istanbul

55.8M/wk5 dependentsBSD-3-Clause
pg-protocolnpm

The postgres client/server binary protocol, implemented in TypeScript

43.8M/wk2 dependentsMITTS
pg-connection-stringnpm

Functions for dealing with a PostgreSQL connection string

38.9M/wk2 dependentsMITTS
cross-fetchnpm

Universal WHATWG Fetch API for Node, Browsers and React Native

32.9M/wk2 dependentsMITTS
kyselynpm

Type safe SQL query builder

15.6M/wk1 dependentsMIT
mongodb-connection-string-urlnpm

MongoDB connection strings, based on the WhatWG URL API

8.8M/wk1 dependentsApache-2.0TS
mongodb-client-encryptionnpm

Official client encryption module for the MongoDB Node.js driver

211.1K/wk2 dependentsApache-2.0TS
knexnpm

A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3

0/wk1 dependentsMITTS
@humanwhocodes/module-importernpm

Universal module importer for Node.js

0/wk1 dependentsApache-2.0TS
istanbul-lib-coveragenpm

Data library for istanbul coverage objects

0/wk10 dependentsBSD-3-Clause
better-sqlite3npm

The fastest and simplest library for SQLite in Node.js.

0/wk5 dependentsMIT
esutilsnpm

utility box for ECMAScript language tools

0/wk2 dependentsBSD-2-Clause
@asamuzakjp/dom-selectornpm

A CSS selector engine.

0/wk1 dependentsMITTS
saxesnpm

An evented streaming XML parser in JavaScript

0/wk1 dependentsISCTS

Relationship graph

Dependencies (left) and dependents (right) of chai.

Frequently installed together

Release history

13 releases in the last two years, typically about 18 days apart.

Recent versions of chai
VersionPublishedSizeLicense
6.2.2latest8 months ago143 KBMIT
6.2.110 months ago150 KBMIT
6.2.011 months ago149 KBMIT
6.1.011 months ago149 KBMIT
5.3.31 year ago428 KBMIT
6.0.11 year ago149 KBMIT
6.0.01 year ago142 KBMIT
5.3.21 year ago421 KBMIT
5.3.11 year ago288 KBMIT
5.3.01 year ago428 KBMIT
5.2.21 year ago428 KBMIT
5.2.11 year ago508 KBMIT
5.2.01 year ago503 KBMIT
5.1.21 year ago496 KBMIT
4.5.02 years ago727 KBMIT

Overview

chai is an npm package that bDD/TDD assertion library for node.js and the browser. Test framework agnostic. It has 57 known dependents in the graph. 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).
  • Trusted by 57 other packages.

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.

Maintainers

Keywords

Frequently asked questions

Should I use chai?

Yes — chai scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 261 days ago. 14 releases in the last 2 years.

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?

npm does not publish download counts. Within PackageGraph's crawl, 57 known packages depend on chai.

Is chai still maintained?

The most recent release of chai (v6.2.2) was published 8 months ago.

Does chai run install scripts?

No. chai does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.