forked from sinonjs/sinon
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds guard for empty properties in deepEqual when a matcher is provid…
…ed (sinonjs#1901) In JavaScript every acts like the "for all" quantifier in mathematics. In particular, for an empty array, it returns true. (It is vacuously true that all elements of the empty set satisfy any given condition.) This is not the intended behaviour for deepEqual, we should treat empty properties as falsy. Resolves sinonjs#1900
- Loading branch information
1 parent
340240e
commit 097fa67
Showing
2 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters