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
- 2
- changes to make
- 0
- advisories fixed
- 8
- new
- 3
- fixes
Before you upgrade
Tick each one off as you go- Breaking3.0.0
- Deprecated3.0.0
Release by release
- 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
- Breaking
6 other lines we could not sort, mostly version bumps
- 3.0.0
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
requireit). - 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'sSymbol.toStringTagaffects the behaviour.to.be.a(). In addition to this, Errors have the type of'error'. - 3.0.0
assert.ifError()now follows Node'sassert.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.
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.