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
Sometimes when debugging tests it is hard to understand why a given test fails when using the events assertion functions. For example, while writing tests I created an assertion that looked something like this:
This test failed with the error Error: Unable to retrieve expected NonFungibleTokenMintEvent, but there was no explanation of why it was failing and what it was expecting, making it hard to debug the test.
Ideally, every assertion would have a more detailed message. In my case, I mixed the token id with the asset id, plus, I wasn't using the right type for the asset id. I'd expect the error message to read something like this:
Unable to retrieve expected NonFungibleTokenMintEvent:
- expected token id to be "token-id", but it was "1" instead;
- expected asset id to be u1, but it was "token-id" instead;
The text was updated successfully, but these errors were encountered:
Sometimes when debugging tests it is hard to understand why a given test fails when using the events assertion functions. For example, while writing tests I created an assertion that looked something like this:
This test failed with the error
Error: Unable to retrieve expected NonFungibleTokenMintEvent
, but there was no explanation of why it was failing and what it was expecting, making it hard to debug the test.Ideally, every assertion would have a more detailed message. In my case, I mixed the token id with the asset id, plus, I wasn't using the right type for the asset id. I'd expect the error message to read something like this:
The text was updated successfully, but these errors were encountered: