Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dirty chai silently breaking should.exist() #41

Open
angusbayley opened this issue Jun 5, 2019 · 0 comments
Open

dirty chai silently breaking should.exist() #41

angusbayley opened this issue Jun 5, 2019 · 0 comments

Comments

@angusbayley
Copy link

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

[email protected]
[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant