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
- install dependencies with
npm install
- open test/index.html