Closed rjharmon closed 12 months ago
I think you have to fall back to comparing the result of toString() for many types. According to the jest documentation toEqual compares the enumerable properties of an object, and the #bytes field of a MintingPolicyHash is strictly private and isn't visible from outside.
v0.15.0 exposes the bytes
property of MintingPolicyHash (along with several other properties of other classes)
Now Jest should work correctly for these types
Thank you, Christian!
These two
MintingPolicyHash
objects are different references (toBe()
doesn't match them).Their
toBech32()
s are clearly different. Butnot.toEqual()
fails..eq(other)
works. but doesn't integrate with jest / vitest.I think this may also be the case for some other types - hopefully they can all be fixed without much difficulty.