@gala-chain/test ∙ API
API > transactionErrorMessageContains
Function: transactionErrorMessageContains()
transactionErrorMessageContains(
s):AsymmetricMatcher_2
Creates a Jest matcher for asserting GalaChain transaction error responses with error messages containing specific text.
Parameters
▪ s: string
The text that should be contained in the error message
Returns
A Jest matcher object that can be used with expect().toEqual()
Example
// Assert error message contains specific text
expect(response).toEqual(transactionErrorMessageContains("insufficient"));
expect(response).toEqual(transactionErrorMessageContains("not found"));