Jasmine array comparison -
i don't understand output:
expected [ ({ label: 'label1', value: 'value1' }), ({ label: 'label2', value: 'value2' }), ({ label: 'label3', value: 'value3' }) ] equal [ object({ label: 'label1', value: 'value1' }), object({ label: 'label2', value: 'value2' }), object({ label: 'label3', value: 'value3' }) ]
jasmine tells me test failing , problem. don't see problem. see 2 arrays of objects should equal each other , do equal each other.
is there subtlety i'm not getting? expectation not being identified 'object({ ... })'? did change jasmine while away mac not running npm install @ all? did change gravitational constant of universe?
answers on postcard. or here better.
what test assertion? if using .toequal
should work - although objects different, .toequal
performs deep comparison.
Comments
Post a Comment