github chaijs/chai 3.1.0
3.1.0 / 2015-07-16

latest releases: v5.1.0, v5.0.3, v5.0.2...
8 years ago

This release adds assertions for extensibility/freezing/sealing on objects:

assert.extensible({});
assert.notExtensible(Object.preventExtensions({}));
expect(Object.preventExtensions({})).to.not.be.extensible;
Object.preventExtensions({}).should.not.be.extensible;

assert.notSealed({});
assert.sealed(Object.seal({}));
expect(Object.seal({})).to.be.sealed;
Object.seal({}).should.be.sealed;

assert.notFrozen({});
assert.frozen(Object.freeze({}));
expect(Object.freeze({})).to.be.frozen;
Object.freeze({}).should.be.frozen;

It also adds assertions for checking if a number is NaN:

assert.isNaN(NaN);
assert.isNotNaN(5);
expect(NaN).to.be.NaN;
expect(5).to.not.be.NaN;
NaN.should.be.NaN;
5.should.not.be.NaN;

Community Contributions

Code Features & Fixes

Don't miss a new chai release

NewReleases is sending notifications on new releases.