Packages

chai

6.3.0 · 30 Sep 2026MIT222.3M / weekRepositoryHomepagenpmAtom feed

Upgrading chai From 2.3.0 to 3.0.0

1 release in betweenevery note read

Other targets from 2.3.0Latest6.3.0
  1. 2.3.0yours
  2. 3.0.0target

Before you upgrade

Tick each one off as you go
  • Breaking3.0.0
  • Deprecated3.0.0

Release by release

  1. 3.0.0

    Migration needed3 Jun 20158 new · 3 fixes
    • Breaking

      This release contains some small breaking changes.

    • Deprecated

      Deprecate .length(n) from the docs - use .lengthOf(n) instead.

    • New

      assert.ifError() behaves like Node.js: it throws if the first argument is present.

    • New

      assertion-error bumped to ^1.0.1

6 other lines we could not sort, mostly version bumps
  • Switched from "Component" builds to "Browserify" builds for Browsers. If you're using RequireJS with Chai, you might notice a change (chai used to be a global, now it won't be - instead you'll have to require it).

    3.0.0
  • .has.property('foo', undefined) will now specifically test to make sure that the value 'foo' is actually undefined - before it simply tested that the key existed (but could have a value).

    3.0.0
  • .to.be.a('type') has changed to support more types, including ES6 types such as 'promise', 'symbol', 'float32array' etc, this also means using ES6's Symbol.toStringTag affects the behaviour .to.be.a(). In addition to this, Errors have the type of 'error'.

    3.0.0
  • assert.ifError() now follows Node's assert.ifError() behaviour - in other words, if the first argument is truthy, it'll throw it.

    3.0.0
  • ReleaseNotes.md is no longer maintained, see the Github Releases Page instead.

    3.0.0
  • History.md is no longer maintained, see the Github Commit Log instead.

    3.0.0

1 internal line (docs, tests, tooling) left out.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.