Open frangio opened 5 years ago
Hmm, this makes a lot of sense. It's also related to https://github.com/OpenZeppelin/openzeppelin-test-helpers/issues/1
Regarding oneOf
and friends, just overriding members
and making it clear in the documentation that it is the only overridden method seems fine to me.
I feel like this issue hasn't been fixed yet.
Is there any workaround ?
The workaround is to do the appropriate array operation manually instead of using Chai's helpers.
It would be better if there was this feature. Hope to add this feature.
Chai's
members
can be used to test that an array contains certain values, as determined by strict equality or optionally deep equality.Neither of those is appropriate to test arrays of big numbers (although deep equality works, it isn't ideal). We could maybe make the
bignumber
property modifymembers
to compare values using bignumber equality?On the other hand, this same issue shows up with many other Chai assertions, like
oneOf
...