Skip to content

Commit

Permalink
Fix #29: Make sure keys assertion, when used with not, works as the o…
Browse files Browse the repository at this point in the history
…riginal keys assertion
  • Loading branch information
astorije committed Nov 2, 2015
1 parent 9abd1af commit 0bc2fd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chai-immutable.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@
if (any) ok = keys.some(has);
else {
ok = keys.every(has);
if (!contains) ok = ok && keys.length === obj.count();
if (!contains && !utils.flag(this, 'negate')) {
ok = ok && keys.length === obj.count();
}
}

if (keys.length > 1) {
Expand Down

0 comments on commit 0bc2fd5

Please sign in to comment.