Skip to content

Add unit tests for TransactionsController - #318

Merged
MissBlue00 merged 1 commit into
MissBlue00:mainfrom
RedheadedProgrammer:fix/283-add-unit-tests-transactionscontroller
Jul 28, 2026
Merged

Add unit tests for TransactionsController#318
MissBlue00 merged 1 commit into
MissBlue00:mainfrom
RedheadedProgrammer:fix/283-add-unit-tests-transactionscontroller

Conversation

@RedheadedProgrammer

Copy link
Copy Markdown

Closes #283

Description

Added comprehensive unit test coverage for the TransactionsController endpoints to meet testing standards.

Changes

  • Created �pps/api/src/transactions/transactions.controller.spec.ts
  • 13 test cases covering all controller endpoints:
    • POST /transactions: registers transactions with all network types (STELLAR, BTC, ETH)
    • GET /transactions: returns paginated list with different statuses and networks
    • GET /transactions/:id: returns single transaction, handles filtering by type/status/date, returns 404 when not found
  • Follows existing test patterns in the codebase (mocked services, Jest setup)
  • All tests passing locally

Testing

Ran \pnpm --filter api test\ and verified:

  • TransactionsController suite: 13 passed
  • No failures or warnings
  • Tests properly mock TransactionsService for isolated unit testing

Type of change

  • New feature (adds unit test coverage)
  • This change requires a documentation update (test file documents endpoint behavior)

- Add comprehensive test coverage for TransactionsController endpoints
- Test POST /transactions registers transactions with all network types
- Test GET /transactions returns paginated list with filtering support
- Test GET /transactions/:id returns single transaction and handles 404
- Mock TransactionsService for isolated unit testing
- All 13 tests passing
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the missblue00's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@RedheadedProgrammer Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@MissBlue00
MissBlue00 merged commit 381abb1 into MissBlue00:main Jul 28, 2026
0 of 3 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.

Add unit tests for TransactionsController

2 participants