unstale

npm / chai

chai

What changed in chai 5 to 6, from its official release notes, upgrade guides and advisories. Also covers @types/chai. Sources checked 2026-11-30.

6 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 init

@unstale/cli on npm

chai 610 changes

Breaking changes 2

  • Iterable assertions require iterators to be callable.

    6.3.0release notes

  • The unbundled lib/*.js files are no longer present; code importing them directly must change to import ./index.js.

    6.0.0release notes

New APIs and options 1

  • More utility type definitions are available to developers using Chai's types.

    6.3.0release notes

Behavior and default changes 1

Tooling 1

  • Chai's build target is now es2021 to support Safari versions earlier than 16.4.

    6.2.1release notes

Fixes and other changes 5

  • The change assertion's JSDoc types are corrected, and it handles 0 and empty string.

    6.3.0release notes

  • The keys() assertion considers only unique expected keys.

    6.3.0release notes

  • Literal template tags are preserved in assertion values.

    6.3.0release notes

  • The failure message for not.deep.oneOf now includes the not modifier.

    6.3.0release notes

  • Avoids a BigInt literal in closeTo for runtime compatibility.

    6.2.2release notes

chai 54 changes

Breaking changes 4

  • Chai supports only ESM; use import statements or dynamic import instead of require('chai').

    5.0.0release notes

  • Internet Explorer is no longer supported.

    5.0.0release notes

  • Minimum supported versions are now Firefox 100, Safari 14.1, Chrome 100, and Edge 100; older browsers receive best-effort support.

    5.0.0release notes

  • NodeJS versions below 18 are no longer supported.

    5.0.0release notes