chai-extras

Additional utility Chai assertions

npm install chai-extras
1 downloads in the last day
14 downloads in the last week
36 downloads in the last month

chai-extras

These are some additional chai plugins that I've found useful for basic javascript types

To install, just do npm install chai-extras

Assertions

atLeast

Assert that the subject is >= to the value provided

(versionNumber).should.be.atLeast(10.2)
expect(versionNumber).to.be.atLeast(10.2)

atMost

Assert that the subject is <= to the value provided

(paginatedEntries).should.be.atMost(entriesPerPage)
expect(paginatedEntries).to.be.atLeast(entriesPerPage)

Tests

  1. install dependencies with npm install
  2. open test/index.html
npm loves you