Skip to content

Fix tests and remove unused import for #675, #673, #672, #690, #693#744

Merged
Jayy4rl merged 1 commit into
StellarYield:mainfrom
UFObject247:feat/orphan-position-cleanup
Jun 30, 2026
Merged

Fix tests and remove unused import for #675, #673, #672, #690, #693#744
Jayy4rl merged 1 commit into
StellarYield:mainfrom
UFObject247:feat/orphan-position-cleanup

Conversation

@UFObject247

Copy link
Copy Markdown

Fix tests, remove dead code, and clean up mock patterns

Closes #669
Closes #691

Description:

  • archived-vaults.test.ts (Add GET /api/v1/admin/vaults/archived endpoint #675): Remove unused import * as vault; refactor mocks to use
    vi.mocked(VaultService).mockReturnValue(...) pattern for consistency.
  • consistency-total-supply.test.ts (Add GET /api/v1/admin/consistency/total-supply #673): Same mock refactoring â�� replace new VaultService()
    • method mocking with constructor return-value mocking.
  • webhooks.test.ts (Write integration tests for webhook registration endpoints #690): Add missing notifications.js mock with validateWebhookUrl;
    include consecutiveFailures field in expected response.
  • deposit-indexing.e2e.test.ts (Write end-to-end test for deposit indexing flow #523): Add child: vi.fn().mockReturnThis() to logger mock.
  • indexer-lag-alert.test.ts (Add indexer lag alert log when behind chain tip #672): Fix beforeEach to be async; replace require with
    await import; rework "logs error on every tick" test to reset lastLedger each iteration.
  • indexer.ts: Remove dead handleOperatorAdded/handleOperatorRemoved methods (duplicates
    of the implementations at lines 887�945 that accept ParsedOperatorAddedEvent).
  • redemption-queue.test.ts: Fix import paths (relative to test location); update XDR API
    calls (xdr.ScAddress instead of xdr.Address, UInt128Parts constructor); align mock
    call order with actual processEvent flow (duplicate check first); update assertion from
    DO NOTHING to DO UPDATE.

@Jayy4rl Jayy4rl merged commit 5f3d5eb into StellarYield:main Jun 30, 2026
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write unit tests for stellar.ts read functions Add orphan position cleanup scheduled job

3 participants