hls-test-utils-2.9.0.0: Utilities used in the tests of Haskell Language Server
Safe HaskellNone
LanguageGHC2021

Development.IDE.Test

Synopsis

Documentation

type Cursor = (UInt, UInt) #

(0-based line number, 0-based column number)

expectDiagnostics :: HasCallStack => [(FilePath, [(DiagnosticSeverity, Cursor, Text)])] -> Session () #

It is not possible to use 'expectDiagnostics []' to assert the absence of diagnostics, only that existing diagnostics have been cleared.

Rather than trying to assert the absence of diagnostics, introduce an expected diagnostic (e.g. a redundant import) and assert the singleton diagnostic.

expectNoMoreDiagnostics :: HasCallStack => Seconds -> Session () #

wait for timeout seconds and report an assertion failure if any diagnostic messages arrive in that period

expectMessages :: forall {t :: MessageKind} (m :: Method 'ServerToClient t). SMethod m -> Seconds -> (TServerMessage m -> Session ()) -> Session () #

isReferenceReady :: FilePath -> Session () #

Pattern match a message from ghcide indicating that a file has been indexed