-
Notifications
You must be signed in to change notification settings - Fork 869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imp(tests): add utility to check balances in tests #2289
Conversation
} | ||
|
||
for _, tc := range testcases { | ||
tc := tc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a super weird pattern in Go I've noticed 👀 in the past we've had problems where the tc
fields were only using values of the last testcase - this solves it. It's very weird though and didn't occur on all tests though .. you'll also find this pattern everywhere in the Cosmos SDK repo for example and also we have it in our codebase a lot
) | ||
|
||
func TestCheckBalances(t *testing.T) { | ||
testDenom := "atest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to check it also works not only for the basic Evmos denom 👀 not 100% necessary but also doesn't harm
Description
This PR adds a helper function to more easily check expected balances during tests.