Telescope test inventory (feature vs suite)

April 3, 2026 · View on GitHub

This document maps LSP / extension features to non-E2E tests (Go, Bun) and VS Code E2E cases. Use it when deciding where to add coverage or what to trim from E2E.

E2E classification legend

TagMeaning
A — smoke / wiringValidates extension + binary + host integration; keep at least one per area.
B — duplicate of GoCore LSP behavior already covered by server/lsp/handler_test.go, integration_test.go, or other Go tests; E2E is redundant unless it caught a client-only bug (see notes).
C — client-onlyEditor language IDs, scanner, session wiring; cannot be replaced by Go LSP tests alone.

Feature matrix (high level)

Feature areaPrimary Go / Bun coverageE2E suite file(s)Notes
Activation & test API—activation.e2e.tsC/A — wiring
Diagnostics (invalid spec, schema errors)integration_test.go, rulesdiagnostics.e2e.tsMix A/B
Diagnostic shape invariantsintegration_test.go, handler testsdiagnostic-contracts.e2e.tsA — user-visible structure/source contract, not deep rule semantics
Delta / file lifecycleintegration + graphdelta-sync.e2e.ts, cross-file-diagnostics.e2e.tsA
OpenAPI JSON behaviorintegration_test.go, handlersopenapi-json.e2e.tsA — proves JSON OpenAPI stays on Telescope-owned diagnostic path
Malformed document non-interferenceintegration_test.go, malformed handlingmalformed-documents.e2e.tsA — editor owns malformed YAML/JSON feedback; Telescope should stay silent
Definition / refs / links / formathandler_test.godefinition-flow.e2e.ts, providers.e2e.tsProviders slimmed to cross-file links + openapi-json format sanity (defs/refs in definition-flow)
Hoverhandler + integration (TestRichAPIFixture_HoverAndDefinition_UnixFileURI, etc.)hover.e2e.tsA — host wiring only; detailed content in Go
Completionhandler_test.gocompletion.e2e.tsB + A
Renamehandler_test.gorename.e2e.tsB + A — Go owns range selection/fallbacks; E2E waits on raw prepareRename readiness and proves a plausible WorkspaceEdit reaches the temp editor buffer.
Code actionshandler_test.gocode-actions.e2e.tsB + A
Execute commandsexecute_command_test.go, integrationcommands.e2e.tsA — fixed-fixture command routing only; sort semantics stay in Go
Code lens—code-lens.e2e.tsA
Symbols—symbols.e2e.tsA
Folding—folding.e2e.tsA
Document highlighthandler_test.go (TestRichAPIFixture_DocumentHighlight_UserSchema, TestDocumentHighlight_RefDirect)document-highlight.e2e.tsA — host wiring; semantics in Go
Semantic tokens—semantic-tokens.e2e.tsA
Inlay hints—inlay-hints.e2e.tsA
Language IDs / classifierclient/test/classifier.test.ts, src/utils.tslanguage-ids.e2e.tsC
Client–server sync / scanner—client-server-sync.e2e.ts, no-bulk-open.e2e.tsC/A
Multi-root workspace—multi-root.e2e.tsA — session counts plus one focused cross-file routing journey
Sidecar (custom rules, Bun runner)server/lsp/bun/*_test.go, server/lsp/bun/runner/src/*.test.tssidecar-*.e2e.tsA for wiring; deep rules live in Go/Bun. Exact custom rule IDs/messages stay below E2E, while the host suite checks telescope-custom wiring plus sidecarInfo availability. If Bun never becomes ready, suites skip at suiteSetup so CI shows pending coverage rather than silent passes.

E2E tests by file (tag per test("…") title)

activation.e2e.ts

Test nameTag
Extension should activateA
Extension should expose test APIA
Sessions should start runningA

client-server-sync.e2e.ts

Test nameTag
Scanner should discover OpenAPI files after scanC
Project info should include workspace pathC

code-actions.e2e.ts

Test nameTag
Code actions offered for file with diagnosticsB
Code actions do not crash on valid fileA
Code actions include disable-rule actions for telescope diagnosticsA

code-lens.e2e.ts

Test nameTag
Code lens shows reference counts on componentsA
Code lens returns array for valid specA

completion.e2e.ts

Test nameTag
$ref completion offers schema component namesB
Completion inside path item offers HTTP methodsB
Completion items have non-empty labels and valid kindsA

cross-file-diagnostics.e2e.ts

Test nameTag
Both cross-file documents produce diagnostics independentlyA
Editing a file triggers re-analysis with updated diagnosticsA

diagnostic-contracts.e2e.ts

Test nameTag
rich-api.yaml produces only warnings, no errorsA
All diagnostics have valid structureA
Valid minimal spec produces zero telescope errorsA

definition-flow.e2e.ts

Test nameTag
Local definition resolves to component in same fileB
Cross-file go-to-definition targets correct fileB
Target document has working hover after navigationA
Target document has working document symbolsA
Find References works on local schemaB

delta-sync.e2e.ts

Test nameTag
Create/change/remove should update diagnosticsA

diagnostics.e2e.ts

Test nameTag
Should produce diagnostics for OpenAPI file with issuesB
Schema validation diagnostics should surface as errorsB
Should not produce errors for valid OpenAPI fileB

commands.e2e.ts

Test nameTag
generateResponseSkeletons adds missing error responsesA
bundlePreview returns merged content for multi-file specA

document-highlight.e2e.ts

Test nameTag
Document highlight on User schema returns array (host wiring)A

folding.e2e.ts

Test nameTag
Folding ranges cover paths and operationsA
Folding ranges exist for simple spec tooA

hover.e2e.ts

Test nameTag
Hover on local $ref returns array (host wiring)A
Hover on cross-file $ref is well-behaved when graph resolvesA
Hover returns empty or array at non-hoverable positionA

inlay-hints.e2e.ts

Test nameTag
Inlay hints appear for $ref valuesA
Inlay hints do not crash on file without refsA

language-ids.e2e.ts

Test nameTag
OpenAPI YAML should be set to openapi-yaml on openC
OpenAPI JSON should be set to openapi-json on openC
Non-OpenAPI YAML should remain yamlC
Open YAML should reclassify after becoming OpenAPIC

malformed-documents.e2e.ts

Test nameTag
Malformed YAML does not produce Telescope-owned syntax diagnosticsA
Malformed JSON does not produce Telescope-owned syntax diagnosticsA

multi-root.e2e.ts

Test nameTag
Should create sessions for all workspace foldersA
Should produce diagnostics for files in each workspace folderA
Delta changes in folderA should not affect folderB project modelA
Cross-file definitions stay bound to the owning workspace folderA

no-bulk-open.e2e.ts

Test nameTag
Startup scan should not open all discovered OpenAPI filesC

openapi-json.e2e.ts

Test nameTag
OpenAPI JSON routes through Telescope-owned schema diagnosticsA

providers.e2e.ts (slim)

Test nameTag
Document links include $ref linksB (handler TestDocumentLinkHandler) + A wiring
Cross-file $ref links target the referenced fileA
Format provider returns valid editsB + A (buffer + LSP format path)

rename.e2e.ts

Test nameTag
Rename tag updates all referencesB + A - server tests own fallback range math; E2E waits for raw prepareRename readiness and checks that VS Code returns an applicable workspace edit for the temp file
Rename provider does not crash on non-renameable positionA
Cross-file schema rename returns edits for definition and refsB

semantic-tokens.e2e.ts

Test nameTag
Semantic tokens returned for OpenAPI fileA
Semantic tokens data has reasonable size for rich specA

symbols.e2e.ts

Test nameTag
Document symbols include paths, operations, and componentsA
Document symbols have valid rangesA
Workspace symbols find schemas by queryA
Workspace symbols find operations by nameA

sidecar-custom-rules.e2e.ts

Test nameTag
Invalid file produces summary-related custom diagnosticsA
Valid file has no summary-related custom diagnosticsA

sidecar-generic-rules.e2e.ts

Test nameTag
Invalid generic file produces version-related custom diagnosticsA
Valid generic file has no version-related custom diagnosticsA

sidecar-lifecycle.e2e.ts

Test nameTag
Sidecar reports configured and available after startupA - suite setup uses the canonical sidecarInfo health contract; the test body re-checks sidecar-native availability via the test API
Editing a file keeps sidecar available after save and restoreA - edit/save a normal fixture, confirm sidecar health via test API, then restore it and confirm sidecar health again
Sidecar surfaces representative custom diagnostics through the extensionA - proves Bun-at-runtime ingress past availability by observing telescope-custom diagnostics through VS Code

sidecar-multi-file-refs.e2e.ts

Test nameTag
Version-isolated external $ref resolves without unresolved-ref diagnosticsA
Path parameters declared via external path fragment stay alignedA

sidecar-openapi-rules.e2e.ts

Test nameTag
Missing operationId fixture remains analyzable while sidecar stays availableA
Key-order fixture remains analyzable while sidecar stays availableA
PathItem-heavy fixture remains analyzable while sidecar stays availableA - E2E keeps this as a wiring/availability journey; exact trailing-slash rule semantics live in Bun/Go tests

sidecar-schema-fixtures-json.e2e.ts

Test nameTag
Invalid JSON schema fixture is analyzableA
Valid JSON schema fixture is analyzableA

sidecar-schema-fixtures-legacy-zod.e2e.ts

Test nameTag
Invalid legacy zod-named fixture is analyzableA
Valid legacy zod-named fixture has no json-schema errorsA

Go references (non-exhaustive)

  • Handlers: server/lsp/handler_test.go — rename, completion, code action, document link, formatting.
  • Integration / broken specs: server/lsp/integration_test.go.
  • Formatting paths: server/lsp/formatting_path_test.go.
  • Sidecar / Bun: server/lsp/bun/*_test.go, custom_rules_integration_test.go.
  • Contract runner config mapping: server/contractrunner/config_test.go — BuildBarometerClientConfig.

Client unit tests (Bun)

  • client/test/classifier.test.ts — OpenAPI detection.
  • client/test/utils-patterns.test.ts — matchesPatternList, key extractors, language ID helpers from src/utils.ts.

Smoke E2E subset

When TELESCOPE_E2E_SMOKE=1 is set (e.g. local fast-feedback loop), the extension host runs a minimal file list from client/e2e-suites.json. CI runs the full matrix, not smoke.