assert.include(<null_or_undefined>, anything) does not fail #147

Closed
sjltaylor opened this Issue Oct 24, 2011 · 2 comments

Comments

Projects
None yet
3 participants

vows such as this which test for the inclusion of something in null:

assert.includes(null, "something")

and (undefined)...

assert.include({}.undefined, "something")

should fail or throw an exception rather than give a false positive.

see: lib/assert/macros.js. line 82: return false; should be return true;

eagleflo commented Jan 9, 2012

Just encountered this. I was really surprised, at the very least documentation should mention this behaviour.

mmalecki closed this in bbc8e55 Jan 10, 2012

Contributor

mmalecki commented Jan 10, 2012

Fixed, thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment