chai
6.3.0 · 30 Sep 2026MIT222.3M / weekRepositoryHomepagenpmAtom feed
3.5.0 is the newest release of 3.x.
In short
1 breaking1 deprecated8 new3 fixed6 changed1 internal
- Breaking
This release contains some small breaking changes.
- Deprecated
Deprecate
.length(n)from the docs - use.lengthOf(n)instead.
Release note
This release contains some small breaking changes. Most people are unlikely to
notice them - but here are the breaking changes:
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 torequireit)..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)..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'.assert.ifError()now follows Node'sassert.ifError()behaviour - in other
words, if the first argument is truthy, it'll throw it.ReleaseNotes.md is no longer maintained, see the Github Releases Page instead.
History.md is no longer maintained, see the Github Commit Log instead.
Community Contributions
Code Features & Fixes
assert.ifError()behaves like Node.js: it throws if the first argument is present.assertion-error bumped to
^1.0.1Replace type.js with type-detect module.
Add
.matches()as alias for.match().Switch to using Browserify for the build system.
.property('foo', undefined)now actually checks to see ifobj.foo === undefined(before it did not).Automate release process as much as possible
Documentation fixes
Improve docs for
.assert()Add some badges to the Readme.
- Deprecated
Deprecate
.length(n)from the docs - use.lengthOf(n)instead. Change
.length(n)examples to.lengthOf(n)instead.Remove stray character in
assert.notIncludedocs
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.