Skip to content

VueServer and DartServer integration tests fail locally in packages/lsp #127

Description

@amondnet

Summary

Eight integration tests in packages/lsp fail when run on a developer machine. The failure is the same on unmodified main with Bun 1.3.5 and on Bun 1.4.3 (found while working on #126), so it predates that upgrade. CI on ubuntu-latest passes.

Suite Failing tests
test/integration/vue.integration.test.ts touches TypeScript utility file, finds symbols in TypeScript utility, finds symbols across Vue and TypeScript files
test/integration/dart.integration.test.ts LSP server starts and connects, provides hover information, finds workspace symbols, finds document symbols, finds symbols across files

Reproduction

cd packages/lsp
bun test ./test/integration/vue.integration.test.ts ./test/integration/dart.integration.test.ts
# 12 pass, 8 fail

Environment: macOS (Darwin 24.6.0), Bun 1.4.3 (also reproduced with 1.3.5), tools managed by mise, dart present on PATH only as a mise shim with no version configured.

Observations

DartServer: availability guard passes, but dart cannot run

The suite is guarded by describe.skipIf(!isDartAvailable), with isDartAvailable = Bun.which('dart') !== null (test/integration/dart.integration.test.ts:19-21). On this machine Bun.which('dart') resolves to a mise shim, but running it fails:

$ dart --version
mise ERROR No version is set for shim: dart

The server process exits immediately (LSP exited with non-zero code, serverId: "dart", exitCode: 1). The suite runs instead of skipping, and every test fails on expect(status.length).toBeGreaterThan(0) with Received: 0.

Likely fix: make the guard check that dart actually runs (for example, spawn dart --version and require exit code 0) rather than only checking that it resolves on PATH.

VueServer: TypeScript server exits and tests time out

  • The typescript server exits with code 1 in test/fixtures/vue-project (LSP exited with non-zero code). A later initialize attempt fails with Timeout after 45000ms (src/client.ts:329).
  • biome also fails to initialize, with Timeout after 45000ms.
  • Two tests hit the default 5000 ms per-test timeout, and finds symbols across Vue and TypeScript files fails with ConnectionError: Connection is closed.
  • The suite's guard only checks Bun.which('npm') (test/integration/vue.integration.test.ts:20-22).

The root cause of the TypeScript server exit has not been confirmed. It may be the same pattern as Dart: a server resolved from the environment that cannot start in the fixture project.

Expected

On a machine without a working Dart SDK, or where the Vue/TypeScript servers cannot start, these suites skip (as they do in CI) instead of failing. With a working toolchain, they pass.

Acceptance criteria

  • The Dart suite skips when dart resolves on PATH but cannot run.
  • The cause of the typescript server exit in test/fixtures/vue-project is identified. The Vue suite either passes or skips with a clear reason.
  • bun test in packages/lsp passes locally on a mise-managed macOS setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lsptype:testTesting improvements or additions

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions