Skip to content

fix(vscode-test-client): spawn lspf-hello binary instead of examples/hello#25

Merged
meymchen merged 1 commit into
mainfrom
fix/21-vscode-test-client-lspf-hello-path
Jun 22, 2026
Merged

fix(vscode-test-client): spawn lspf-hello binary instead of examples/hello#25
meymchen merged 1 commit into
mainfrom
fix/21-vscode-test-client-lspf-hello-path

Conversation

@meymchen

Copy link
Copy Markdown
Owner

Summary

Completes issue #21 (migrate smoke tests and VS Code test client to lspf-hello).

The workspace migration (#24) already moved the end-to-end smoke tests into crates/lspf-hello/tests/ — they build the lspf-hello binary via CARGO_BIN_EXE_lspf-hello and run under cargo test --workspace. The one remaining piece was the VS Code test client, which still spawned the now-nonexistent target/debug/examples/hello.

This PR points the client at target/debug/lspf-hello and updates its docs.

Approach (TDD)

The testable behavior in the TS client is the server-binary path resolution, so I drove it test-first:

  1. RED — added src/serverPath.test.ts asserting the resolved path is target/debug/lspf-hello and is not the legacy examples/hello path. Failed (module missing).
  2. GREEN — extracted a pure resolveServerBinary(repoRoot) into src/serverPath.ts.
  3. Refactor — wired extension.ts to use it.

Tests use the Node built-in test runner (node --test), so no new dependencies are added.

Acceptance criteria

  • tests/smoke.rs lives in crates/lspf-hello/tests/ (done in refactor: migrate repository to Cargo workspace (#20) #24)
  • Test helper builds/points at lspf-hello (uses CARGO_BIN_EXE_lspf-hello)
  • tools/vscode-test-client/ code + README spawn target/debug/lspf-hello
  • cargo test --workspace includes the relocated smoke tests (3 passing)
  • Manual VS Code F5 smoke check — recommended for the reviewer

Verification

  • cargo test --workspace — all pass, including the 3 relocated smoke tests
  • npm run compile in tools/vscode-test-client — clean
  • npm test — 2 passing

Closes #21

🤖 Generated with Claude Code

…hello

The workspace migration moved the template server from `examples/hello`
to the `lspf-hello` workspace member, but the VS Code test client still
pointed at `target/debug/examples/hello`, which no longer exists.

Extract the server-path resolution into a pure `resolveServerBinary`
function so it can be unit-tested, and point it at
`target/debug/lspf-hello`. Add a Node built-in test-runner test guarding
against regressing to the legacy example path, and update the README and
package metadata to the `cargo build -p lspf-hello` workflow.

The end-to-end smoke tests already live in `crates/lspf-hello/tests/` and
run under `cargo test --workspace`, completing issue #21.

Closes #21

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@meymchen meymchen merged commit 89a722e into main Jun 22, 2026
4 checks passed
@meymchen meymchen deleted the fix/21-vscode-test-client-lspf-hello-path branch June 22, 2026 16:30
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.

[VS Code/Zed MVP] Migrate smoke tests and VS Code test client to lspf-hello

1 participant