# Feature catalog — chaijs/chai

> Canonical page: https://codevetter.com/unpack/chai/feature-catalog

# Feature catalog — chaijs/chai

Scanned commit d86de2a9519bdd0d89aa64c9fbcc0e880513b153 (2026-09-29). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Users choose fluent expect or should assertions, or named assert helpers. Built-ins cover scalar values, object structure, collections, numeric relationships, exceptions, predicates, and callback-driven changes. Modifiers alter comparison depth, property lookup, collection ordering, inclusion, and negation. Failure formatting and plugin installation are additional public capabilities.
- expect(value, message) constructs an Assertion; should()/Should() installs an Object.prototype accessor; assert(expression, message) evaluates truthiness through Assertion.assert. Registration modules expose these styles globally. — [lib/chai/interface/expect.js#L16-L20](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/interface/expect.js#L16-L20) [lib/chai/interface/should.js#L13-L52](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/interface/should.js#L13-L52) [lib/chai/interface/assert.js#L26-L29](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/interface/assert.js#L26-L29) [README.md#L79-L95](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/README.md#L79-L95)
- Equality has deliberate interface differences: fluent equal/equals/eq uses === or delegates to eql when deep is set, whereas assert.equal uses == and assert.strictEqual delegates to fluent equal. — [lib/chai/core/assertions.js#L1117-L1139](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L1117-L1139) [lib/chai/core/assertions.js#L1181-L1195](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L1181-L1195) [lib/chai/interface/assert.js#L124-L135](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/interface/assert.js#L124-L135) [lib/chai/interface/assert.js#L178-L180](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/interface/assert.js#L178-L180)
- Scalar and shape checks include a/an type matching, truthiness, strict booleans, null/undefined/NaN/existence, numeric Number-or-BigInt detection, callable checks, and extensible/sealed/frozen status. — [lib/chai/core/assertions.js#L328-L352](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L328-L352) [lib/chai/core/assertions.js#L678-L757](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L678-L757) [lib/chai/interface/assert.js#L396-L541](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/interface/assert.js#L396-L541) [lib/chai/core/assertions.js#L3934-L4034](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L3934-L4034)
- Object assertions support direct, own, nested, and deep property comparisons, descriptor inspection, key sets, and respondTo method checks; nested and own cannot be combined. — [lib/chai/core/assertions.js#L1923-L2024](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L1923-L2024) [lib/chai/core/assertions.js#L2157-L2196](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L2157-L2196) [lib/chai/core/assertions.js#L2473-L2510](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L2473-L2510) [lib/chai/core/assertions.js#L2994-L3011](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L2994-L3011)
- Collection and text assertions provide include aliases, empty, length/lengthOf, iterable members with deep/ordered/inclusion modes, oneOf, regular-expression matching, and substring checks; deep inclusion explicitly rejects WeakSet. — [lib/chai/core/assertions.js#L514-L641](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L514-L641) [lib/chai/core/assertions.js#L985-L1022](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L985-L1022) [lib/chai/core/assertions.js#L2260-L2368](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L2260-L2368) [lib/chai/core/assertions.js#L3274-L3435](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L3274-L3435)
- Numeric APIs include above/least/below/most aliases, within bounds, closeTo/approximately tolerance checks, finite-number checks, and assert.operator's explicit comparison-operator switch. — [lib/chai/core/assertions.js#L1239-L1304](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L1239-L1304) [lib/chai/core/assertions.js#L1668-L1710](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L1668-L1710) [lib/chai/core/assertions.js#L3126-L3166](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L3126-L3166) [lib/chai/interface/assert.js#L2059-L2099](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/interface/assert.js#L2059-L2099)
- Behavior assertions synchronously check thrown values against error identity/constructor/message criteria, run satisfy predicates, and measure change/increase/decrease with optional by(delta) checks. — [lib/chai/core/assertions.js#L2760-L2928](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L2760-L2928) [lib/chai/core/assertions.js#L3073-L3087](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L3073-L3087) [lib/chai/core/assertions.js#L3532-L3571](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L3532-L3571) [lib/chai/core/assertions.js#L3882-L3905](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L3882-L3905)
- containSubset recursively matches object fields and array elements, compares Dates by timestamp, and accepts field validators; assert.containsSubset and doesNotContainSubset wrap it. Users can also configure diagnostics and install plugins through use. — [lib/chai/core/assertions.js#L4101-L4149](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/core/assertions.js#L4101-L4149) [lib/chai/interface/assert.js#L3201-L3224](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/interface/assert.js#L3201-L3224) [lib/chai/config.js#L14-L111](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/config.js#L14-L111) [lib/chai.js#L48-L65](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai.js#L48-L65)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
