Allow expecting a `string` failure with or without an accompanying value paired to it in a simple way
Clarification and motivation
This issue is particularly important for the FA2 standard, as this allows for errors to be both string
or pair string x
, where x
can be any other valid type.
Since we want to support tests for an FA2 contract regardless of which of the two types it's using in its error, we need a simple way declare this in tests, e.g.:
transfer
entrypoint call fails and the value it fails with is either"FA2_TOKEN_UNDEFINED"
string or a pair where the first item is this string (and the second one doesn't matter)
Note: this issue will mostly likely need #451 (closed).
It also closely relates to #383 (closed) and should not be started before this is complete (it may even be solved by it already.
Acceptance criteria
It's easily possibly to write a tests that expects a failure for a specific string
that accepts either of this as valid:
- the
string
itself on its own - that
string
in apair string x
where x can be anything