-
Notifications
You must be signed in to change notification settings - Fork 91
[Test] keeper-tx.ts has no test file #657
Copy link
Copy link
Closed
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programchoreBuild, CI, dependency updates, or repository maintenanceBuild, CI, dependency updates, or repository maintenancesdkInvolves Blend or DeFindex SDK helpers in packages/stellar-sdk-helpersInvolves Blend or DeFindex SDK helpers in packages/stellar-sdk-helperstestingAdds or improves test coverage (unit, integration, or e2e)Adds or improves test coverage (unit, integration, or e2e)trivialSelf-contained task, completable in < 2 hours with no deep protocol knowledge requiredSelf-contained task, completable in < 2 hours with no deep protocol knowledge required
Description
Activity
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programchoreBuild, CI, dependency updates, or repository maintenanceBuild, CI, dependency updates, or repository maintenancesdkInvolves Blend or DeFindex SDK helpers in packages/stellar-sdk-helpersInvolves Blend or DeFindex SDK helpers in packages/stellar-sdk-helperstestingAdds or improves test coverage (unit, integration, or e2e)Adds or improves test coverage (unit, integration, or e2e)trivialSelf-contained task, completable in < 2 hours with no deep protocol knowledge requiredSelf-contained task, completable in < 2 hours with no deep protocol knowledge required
Description
There is no
keeper-tx.test.tsanywhere inpackages/stellar-sdk-helpers, even thoughkeeper-tx.tsexports several pure, easily-testable classification functions:isDefinitiveOnChainFailure(lines 71-73),isTransientKeeperError(lines 95-107, including the status-code regex at line 89),isStaleAdapterError(lines 152-154), andexpectString(lines 115-126).Acceptance Criteria
keeper-tx.test.tscoversisTransientKeeperError: returnstruefor aSubmissionInFlightErrorand for messages matching429/503/"rate limit",falsefor aSubmissionFailedError.expectString: throws for a non-string value (e.g.nullor a number), returns the value unchanged for a string.pnpm test(stellar-sdk-helpers package) passes.