Skip to content

Return a small test API from activate() #130

Description

@CatarinaGamboa

Why: integration tests run against the webpack bundle (dist/extension.js), so they can't import state.ts and see the running extension. Polling getDiagnostics can't tell "no errors" apart from "the server crashed" or "it hasn't finished yet". The server catches verifier exceptions, clears diagnostics and sends a failure.

What: return an object from activate(), without changing behaviour:

  • ready: a promise that resolves once the language client has started
  • onDiagnostics: fires when liquidjava/diagnostics arrives, including when it's empty
  • getState(): the current status and diagnostics
  • onWebviewMessage: messages sent to and from the webview (used in Webview message and lifecycle tests #133)

References:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTesting related

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions