prodatakey / dirty-chai

Extends Chai with lint-friendly terminating assertions
225 stars 18 forks source link

IsTrue always works #38

Open tex0l opened 6 years ago

tex0l commented 6 years ago

Versions

Steps to reproduce

const chai = require('chai')
const dc = require('dirty-chai')
chai.use(dc)
try {
  chai.assert.isTrue(false)
  console.log('I should never be called')
} catch (error) {
  console.log('I should be called')
}

Expected behaviour

I should get I should be called.

Actual behaviour

I get I should never be called.