# chaijs/chai

BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.

Repository: https://github.com/chaijs/chai
Canonical: https://ross.abutalabs.com/products/chai
Homepage: https://chaijs.github.io
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, assertions, chai, tdd, bdd
Last push: 2026-08-24T19:35:15+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 62, longevity 100
- inputs: {"age_days": 5383, "days_push": 9, "days_rel": 254, "gap_med": 3, "n_releases_24m": 14}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8269, forks 723 (observed 2026-08-28T04:10:19.988229+00:00)

## What it is
Chai is a BDD/TDD assertion library for Node.js and the browser that can be paired with any JavaScript testing framework. It offers three assertion styles (assert, expect, should) and an extensible plugin API.

## Use cases
- write assertions for javascript unit tests
- use expect/should style BDD assertions with mocha
- assert deep equality and object properties in tests
- add custom assertions via a plugin
- test code in the browser and node with the same assertion library

## When to choose
- you need expressive, chainable assertions independent of your test runner
- you want a mature, widely adopted assertion library with a plugin ecosystem
- you need both TDD assert-style and BDD expect/should styles

## When to avoid
- your test framework already bundles its own assertion API you prefer (e.g. vitest/jest expect)
- you need a full test runner, not just assertions

## Facets
- artifact type: library
- maturity: stable
- function: testing
- domain: testing, developer-tools, web-development
- platform: browser, cross-platform
- tags: assertions, bdd, tdd, javascript, test-framework-agnostic, plugin-system, nodejs

## Member repositories
- chaijs/chai (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:19.988229+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:28:10.525458+00:00, confidence not recorded.
  - readme: https://github.com/chaijs/chai (fetched 2026-08-28T04:10:19.988229+00:00, sha aa9ab4436212)
  - homepage: https://chaijs.github.io (fetched 2026-08-29T08:28:19.632561+00:00, sha d025df0adea2)
  - site_page: https://www.chaijs.com/guide/installation (fetched 2026-08-29T08:28:19.641495+00:00, sha e4b06268ee45)
  - site_page: https://www.chaijs.com/guide (fetched 2026-08-29T08:28:19.645642+00:00, sha 8c315918bad8)
  - registry_npm: https://registry.npmjs.org/chai (fetched 2026-08-29T08:28:19.651128+00:00, sha bf5c835ce21e)
  - site_page: https://www.chaijs.com/releases (fetched 2026-08-29T08:28:19.643263+00:00, sha 6b8b90d7a6d4)
  - site_page: https://www.chaijs.com/api (fetched 2026-08-29T08:28:19.647469+00:00, sha e51ba32bd046)
  - site_page: https://www.chaijs.com/plugins/chai-webdriver (fetched 2026-08-29T08:28:19.649165+00:00, sha c32203a140c0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
