prodatakey / dirty-chai

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

dirty chai silently breaking should.exist() #41

Open angusbayley opened 5 years ago

angusbayley commented 5 years ago

Hey there. I'm seeing dirty-chai silently breaking chai's should.exist() pattern, allowing non undefined and null types to pass without raising. This isn't mentioned in the readme.

Example (in node REPL):

> const chai = require('chai');
> const dirtyChai = require('dirty-chai');
> const should = chai.should();

> should.exist(null)
{ AssertionError: expected null to exist[...] }

> chai.use(dirtyChai);
> should.exist(null)
undefined

dirty-chai@2.0.1 chai@4.2.0