When using the sdk with vitest, if the custom matcher expects the wrong types, we keep error messages short
(eg: expect(Cl.uint(1)).toBeOk(Cl.uint(1)) will throw actual value must be a Clarity "UInt", received "ResponseOk")
This should be improved to display a more detailed error diff, but it requires some more work so that the error message remain readable, even when the test is handling big set of data (such as big lists or buffers).
This PR simply handle a quick fix for the common case were expectOk actually receive a ResponseError. We should display the received error
Description
When using the sdk with vitest, if the custom matcher expects the wrong types, we keep error messages short (eg:
expect(Cl.uint(1)).toBeOk(Cl.uint(1))
will throwactual value must be a Clarity "UInt", received "ResponseOk"
)This should be improved to display a more detailed error diff, but it requires some more work so that the error message remain readable, even when the test is handling big set of data (such as big lists or buffers).
This PR simply handle a quick fix for the common case were
expectOk
actually receive a ResponseError. We should display the received error