- src/routes/perp.rs: 1,684 lines of tests (lines 1668-3351)
⚠️ - src/routes/beacon.rs: ~450 lines of tests (lines 774-1224)
- src/routes/info.rs: ~30 lines of tests (lines 36-66)
- src/services/transaction/events.rs: Already moved placeholder tests
- src/services/transaction/execution.rs: Already moved placeholder tests
- perp.rs was 3,351 lines - of which 1,684 lines (50%) were tests!
- beacon.rs was 2,222 lines - of which ~450 lines (20%) were tests
Without tests:
- perp.rs will be ~1,667 lines
- beacon.rs will be ~1,772 lines
transaction_events_tests.rs- Event parsing signature teststransaction_execution_tests.rs- Nonce error and mutex testsperp_operations_tests.rs- Perp deployment testsbeacon_tests.rs- Beacon route tests (NEW)info_tests.rs- API info endpoint tests (NEW)
nonce_sync_tests.rs- Nonce synchronization testswallet_test.rs- Wallet funding testsmodels_test.rs- Model validation tests
test_utils.rs- Shared test utilities (moved from src/routes/)test_fixtures/- Contract ABIs (moved from src/)
- Extract perp.rs tests (1,684 lines) to
tests/unit_tests/perp_route_tests.rs - Remove test modules from all src/ files
- Update test imports to use
the_beaconator::paths - Fix test_utils references in existing tests
Before Cleanup:
- src/routes/perp.rs: 3,351 lines
- src/routes/beacon.rs: 2,222 lines
- Tests mixed with production code
After Cleanup (estimated):
- src/routes/perp.rs: ~1,667 lines (50% reduction!)
- src/routes/beacon.rs: ~1,772 lines (20% reduction)
- All tests in proper test directory structure