Summary
Test fixtures that assert key balances after a sequence of buys and sells inline the expected values as magic numbers. A helper that computes the expected balance from a list of buy and sell amounts makes the sequence intent clear and reduces maintenance.
Scope
- add a test helper that takes an initial balance and a sequence of buy and sell amounts and returns the expected final balance
- use the helper in at least one existing test that sequences multiple trades
- keep the helper in the test module
Acceptance Criteria
- the helper correctly computes the expected balance for any buy and sell sequence
- at least one existing test is updated to use the helper
- the helper handles mixed sequences of buys and sells in any order
Contributor coordination: if you pick this up, reach out in Telegram for updates or clarification: https://t.me/accesslayerorg
Summary
Test fixtures that assert key balances after a sequence of buys and sells inline the expected values as magic numbers. A helper that computes the expected balance from a list of buy and sell amounts makes the sequence intent clear and reduces maintenance.
Scope
Acceptance Criteria
Contributor coordination: if you pick this up, reach out in Telegram for updates or clarification: https://t.me/accesslayerorg