chai-lint

Chai plugin which plays nice with linters

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
chai-lint
220.1.17 years ago7 years agoMinified + gzip package size for chai-lint in KB

Readme

Allows to bypass chai's property assertions, which make linters unhappy (confer https://github.com/eslint/eslint/issues/2102).
Provides the following functions, which is the appropriate property getters under the hood:
  • beOk
  • beTrue
  • beFalse
  • beNull
  • beUndefined
  • beEmpty
  • beArguments
  • toExist

Use them like this:
expect(object).toExist();
expect(array).to.beEmpty();

Sinon assertions are also supported, for example:
expect(spy).to.have.beenCalled();