Chai plugin that converts terminating property assertions (true, false, null, etc.) into function-call form to avoid lint errors and ensure assertions are actually executed. v0.0.2 is the latest stable version, released as a maintenance fork of dirty-chai that works with modern bundlers (ESM/CJS compatibility). Key differentiator vs. dirty-chai: fixes bundler issues without changing API. Supports custom error messages and works with other Chai plugins when loaded first. Ships TypeScript types.
npm install chai-parenthesesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing and using chai-parentheses with Chai's expect, including function-call form for terminators.
Place length/arguments assertions first in chain or use separate assertion statements.
Load chai-as-promised first, then chai-parentheses, then other plugins like sinon-chai.
Always end with () for terminators: expect(true).to.be.true() or expect(true).to.be.true.and.not.false()
Replace dirty-chai with chai-parentheses in package.json and imports. API is identical.
Use .length first: myArray.should.have.length(3).and.should.exist()
Add parentheses: expect(true).to.be.true()
Correct: chai.use(parentheses); not chai.use(parentheses());