You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a bit confused by the deepEquals behaviour here. As there is an option to enable deepObject equivalence I was not expecting objects to be equivalent (with deepObject=false) in this scenario.
I was expecting that the multiple calculation would be run twice. Once for the first multiply(a,b,c) and again for the multiply(a2,b,c). The same is true for arrays.
I dug into the code a little and it looks like the intention is to penetrate 1 level deep by default?
As far as I know the arguments to a function will always be the array-like Arguments object, and I don't think that would ever be the same across function calls so it would make sense to me to start with something that handles the array specifically and then drops into the shallow or deepEquals possibilities.
Perhaps deepEquals and deepObject equals should be separate arguments, but I've reused deepObject in this example PR: #77
It should be easy to see the current behaviour for these unit tests by putting:
I'm a bit confused by the deepEquals behaviour here. As there is an option to enable deepObject equivalence I was not expecting objects to be equivalent (with
deepObject=false
) in this scenario.I was expecting that the multiple calculation would be run twice. Once for the first
multiply(a,b,c)
and again for themultiply(a2,b,c)
. The same is true for arrays.I dug into the code a little and it looks like the intention is to penetrate 1 level deep by default?
As far as I know the arguments to a function will always be the array-like Arguments object, and I don't think that would ever be the same across function calls so it would make sense to me to start with something that handles the array specifically and then drops into the shallow or deepEquals possibilities.
Perhaps
deepEquals
anddeepObject
equals should be separate arguments, but I've reuseddeepObject
in this example PR: #77It should be easy to see the current behaviour for these unit tests by putting:
back in.
The text was updated successfully, but these errors were encountered: