Before the 2.0 release of Chai, these assertions could be written as properties or as functions. For example:
expect(foo).to.be.true;
expect(foo).to.be.true();
expect(foo).to.be.empty;
expect(foo).to.be.empty();
expect(foo).to.exist;
expect(foo).to.exist();
expect(foo).to.be.null;
expect(foo).to.be.null();
The documentation on chaijs.com even explained that this dual-syntax was there to play nice with some IDEs and linting tools that flag the non-function syntax as an error. But in 2.0, the function syntax no longer exists. Was it removed by accident, or was there a reason for it?
Before the 2.0 release of Chai, these assertions could be written as properties or as functions. For example:
The documentation on chaijs.com even explained that this dual-syntax was there to play nice with some IDEs and linting tools that flag the non-function syntax as an error. But in 2.0, the function syntax no longer exists. Was it removed by accident, or was there a reason for it?