Skip to content

Enable NAPI tests to run with locally run gltestserver#679

Open
ShahanaFarooqui wants to merge 4 commits intoBlockstream:mainfrom
ShahanaFarooqui:napi-tests-local-gltestserver
Open

Enable NAPI tests to run with locally run gltestserver#679
ShahanaFarooqui wants to merge 4 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).

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