test: enhance and harden QA suites (e2e, jwt, settlement, invoice.service) - #432
Merged
Chucks1093 merged 2 commits intoAug 31, 2026
Merged
Conversation
…vice) Enhances and optimizes four test files per issues StellarState#346-StellarState#349. All four suites failed to compile on dev (garbled code from StellarState#424 / StellarState#431), so this also lands the minimal source fixes needed to unblock them. Target suites: 0 -> 101 passing tests. Source fixes (prerequisite): - invoice.service.ts: remove dead try/catch block spliced into getInvoiceTokenHolders (referenced undefined uploadResult / input). - User.model.ts: replace invalid Omit<User,"deleted_at"> return type on toPublicDTO with an explicit Pick<>; restore missing class-closing brace. - Invoice.model.ts: readonly transition-map type; restore missing brace; drop now-unused BeforeInsert/BeforeUpdate imports. StellarState#346 full-flow.e2e.test.ts: - extract duplicated seller/investor challenge-response into authenticateViaChallenge() helper - wrap beforeAll harness bring-up in try/catch with structured logging - add jest.setTimeout(30_000) against sporadic CI timeouts StellarState#347 auth-jwt-validation.test.ts: - build the test app once in beforeAll instead of ~25 times - add signToken / getMe / expectRejected helpers; collapse ~20 cases into two it.each tables - assert the middleware's real granular messages (Invalid token payload., User no longer exists.); all failure modes still return the 401 envelope StellarState#348 settlement.integration.test.ts: - fix 2 broken tests: the log lookup matched the funding transition (published -> funded) emitted by fullyFundInvoice, not settlement's - add findSettlementTransitionLog / findSettlementCompletionLog helpers and route all log assertions through them StellarState#349 invoice.service.test.ts: - add buildCreateInput() factory and wireCreatePassthrough() helper - convert net-amount tests to an it.each table exercising the real calculation, keeping the 29.99 @ 0.5% IEEE-754 regression guard Closes StellarState#346 Closes StellarState#347 Closes StellarState#348 Closes StellarState#349 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@CeceOs92 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.
Enhances and optimizes four test files per issues #346-#349. All four suites failed to compile on dev (garbled code from #424 / #431), so this also lands the minimal source fixes needed to unblock them.
Target suites: 0 -> 101 passing tests.
Source fixes (prerequisite):
#346 full-flow.e2e.test.ts:
#347 auth-jwt-validation.test.ts:
#348 settlement.integration.test.ts:
#349 invoice.service.test.ts:
Closes #346
Closes #347
Closes #348
Closes #349