chai-lint

v0.1.1
Chai plugin which plays nice with linters
chai eslint jshint

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();
npm i chai-lint

Metadata

  • MIT
  • Whatever
  • LFDM
  • released 7/11/2015

Downloads

Maintainers