test: controller specs and auth e2e suite (#218, #219, #220, #221) - #361
Merged
EmmanuelOchaje merged 5 commits intoSep 26, 2026
Conversation
✅ Deploy Preview for stellarticketsbackend ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@precious-akpan 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EventsController: spec now covers all 10 routes (public + JWT-guarded), cache headers, DTO validation and error propagation.TicketsController: new spec covering all 26 routes: auth, params (incl. malformedby-chainid → 404), DTO validation,ScanRateLimitGuardon verify,IdempotencyInterceptoron every build-tx route, and error propagation.OrganizationsControllerandUsersController: new specs with mocked services, happy and error paths.test/auth.e2e-spec.ts: register, login andGET /users/meagainst a real database using the realJwtAuthGuard. Accounts use a per-run email domain and are deleted inafterAll.Controller specs share
test/helpers/controller-app.ts, which boots one controller over HTTP with a mocked service, the app'sValidationPipesettings and a fake JWT guard.Test evidence
npx jest: 67 suites, 538 tests pass.jest --config test/jest-e2e.json test/authagainst Postgres 16: 13/13 pass.eslintandprettier.Notes
StellarServiceis overridden in the auth e2e (same asevents.e2e-spec.ts); auth never touches the chain.package-lock.jsonis out of sync withpackage.jsononmain(npm cifails), unrelated to this PR and left untouched.Closes #218
Closes #219
Closes #220
Closes #221