Skip to content

FFI: Refactor Javascript integration test#1584

Open
xstoicunicornx wants to merge 1 commit into
payjoin:masterfrom
xstoicunicornx:refactor-js-integration-test
Open

FFI: Refactor Javascript integration test#1584
xstoicunicornx wants to merge 1 commit into
payjoin:masterfrom
xstoicunicornx:refactor-js-integration-test

Conversation

@xstoicunicornx
Copy link
Copy Markdown
Collaborator

Summary

There are a few things this refactor aims to address:

  • The web payjoin module is imported from the src folder when the distributed code actually lives in the dist folder
  • The type PJ<K extends keyof PayjoinModule> is casting to any type rather than the actual type of the payjoin module member
  • The CheckInputsNotSeenCallback callback parameter is typed as an ArrayBuffer when it should be OutPoint
  • The tests could be better modularized to allow for easier implementation of further permutations of the Javascript integration test

This refactor was written in preparation of implementing PR 1446. PR 1446 will add an additional test permutation to this integration test and benefit from this refactor.

This refactor was written with the help of Claude AI.

Pull Request Checklist

Please confirm the following before requesting review:

Consolidate standalone receiver processing functions into
a ReceiverProcessor class that encapsulates the payjoin
module, RPC client, and persister. Fix the PJ helper type
to use prototype inference, update the web import paths
from src to dist, and correct the CheckInputsNotSeenCallback
parameter type.
@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 26542886374

Coverage remained the same at 85.14%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13701
Covered Lines: 11665
Line Coverage: 85.14%
Coverage Strength: 394.85 hits per line

💛 - Coveralls

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.

2 participants