Repository navigation
VueServer and DartServer integration tests fail locally in packages/lsp #127
Description
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 failEnvironment: 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
typescriptserver exits with code 1 intest/fixtures/vue-project(LSP exited with non-zero code). A later initialize attempt fails withTimeout after 45000ms(src/client.ts:329). biomealso fails to initialize, withTimeout after 45000ms.- Two tests hit the default 5000 ms per-test timeout, and
finds symbols across Vue and TypeScript filesfails withConnectionError: 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
dartresolves onPATHbut cannot run. - The cause of the
typescriptserver exit intest/fixtures/vue-projectis identified. The Vue suite either passes or skips with a clear reason. -
bun testinpackages/lsppasses locally on a mise-managed macOS setup.
Activity
test(lsp): skip dart integration tests when dart cannot run (#128)
chore(lsp): apply AI code review suggestions
refactor(lsp): look up system dart on the current PATH
fix(lsp): fall back to downloaded dart sdk when system dart cannot run (