npm / chai
chai
What changed in chai 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
1 breaking1 new APIs and options1 behavior and defaults1 tooling5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initchai 69 changes
Breaking changes 1
Iterable assertions require iterators to be callable.
New APIs and options 1
More utility type definitions are available to developers using Chai's types.
Behavior and default changes 1
Deep include oneOf assertions are supported.
Tooling 1
Chai's build target is now es2021 to support Safari versions earlier than 16.4.
Fixes and other changes 5
The change assertion's JSDoc types are corrected, and it handles 0 and empty string.
The keys() assertion considers only unique expected keys.
Literal template tags are preserved in assertion values.
The failure message for not.deep.oneOf now includes the not modifier.
Avoids a BigInt literal in closeTo for runtime compatibility.