Make expect(false) work as a failing assertion
Author: fulldecentCreated Jul 28, 2021Updated Aug 11, 2025
If there is going to be magic like expect.to.be.true (without the () on true), then it is surprising that expect(false) is not equivalent to expect(false).to.equal(true).
Your test will pass if you have expect(false) inside. And this is dangerous.
Source: chaijs/chai