Skip to content

Enable NAPI tests to run with locally run gltestserver#679

Closed
ShahanaFarooqui wants to merge 5 commits intoBlockstream:mainfrom
ShahanaFarooqui:napi-tests-local-gltestserver
Closed

Enable NAPI tests to run with locally run gltestserver#679
ShahanaFarooqui wants to merge 5 commits intoBlockstream:mainfrom
ShahanaFarooqui:napi-tests-local-gltestserver

Conversation

@ShahanaFarooqui
Copy link
Collaborator

@ShahanaFarooqui ShahanaFarooqui commented Mar 3, 2026

This PR updates the test infrastructure for the Node.js NAPI bindings to properly support running tests against a locally run gltestserver. Previously, tests attempted to connect to remote Greenlight services. Now, tests can be run against a local regtest environment for faster, more reliable, and isolated testing.

Key Changes

  • Environment Configuration
  • Added test helper functions
  • Adjusted current tests to run with local gltestserver
  • Documentation Updates

Limitations

  • send / receive tests skipped: These operations require an LSPS2 peer connection. The necessary connectPeer command is not yet implemented, preventing these tests from running.
  • Skipping onchainSend due to timeout: The onchainSend method currently hangs indefinitely, causing the related tests to time out.

This PR establishes the foundational test setup required for Issue #677 by enabling Jest integration tests to run against a local gltestserver. This immediate solution allows for reliable testing while laying the groundwork for the next phase: fully integrating with the existing Python testing infrastructure (pyln.testing + gl-testing).

@ShahanaFarooqui ShahanaFarooqui force-pushed the napi-tests-local-gltestserver branch from ed73f60 to 8e7222a Compare March 7, 2026 03:22
@ShahanaFarooqui
Copy link
Collaborator Author

Closing in favour of #681, which replaces the custom helper functions in this PR with the existing gl-testing fixtures directly.

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.

1 participant