context
We have 18 TS tests and 25 Python tests. Coverage is decent but some paths are untested:
- Bus layer: what happens when cap_J overflows? when li_J hits 0? when rectified_W exceeds charge rate?
- Compute layer: mode transition edges — what triggers sleep→idle, idle→tx, tx→rx? Do the current draws match MODE_CURRENTS exactly?
- Full sim: restart after flameout with residual bus charge — does the state machine handle it cleanly?
goal
Add tests (TS and/or Python, your call) for these edge cases. Don't aim for 100% coverage — focus on the paths most likely to break if someone changes a constant or threshold.
notes
Look at existing tests in packages/sim/tests/ and python/sim_mini/tests/ for the pattern. Both use assert-based testing, no mocks.
context
We have 18 TS tests and 25 Python tests. Coverage is decent but some paths are untested:
goal
Add tests (TS and/or Python, your call) for these edge cases. Don't aim for 100% coverage — focus on the paths most likely to break if someone changes a constant or threshold.
notes
Look at existing tests in
packages/sim/tests/andpython/sim_mini/tests/for the pattern. Both use assert-based testing, no mocks.