MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / openDoc

Function openDoc

pkg/lsp/handler_functional_test.go:264–276  ·  view source on GitHub ↗

--------------------------------------------------------------------------- Helpers ---------------------------------------------------------------------------

(t *testing.T, server *Server, sql string)

Source from the content-addressed store, hash-verified

262// ---------------------------------------------------------------------------
263
264func openDoc(t *testing.T, server *Server, sql string) {
265 t.Helper()
266 params := DidOpenTextDocumentParams{
267 TextDocument: TextDocumentItem{
268 URI: "file:///test.sql",
269 LanguageID: "sql",
270 Version: 1,
271 Text: sql,
272 },
273 }
274 raw, _ := json.Marshal(params)
275 server.handler.HandleNotification("textDocument/didOpen", raw)
276}
277
278func extractPublishedDiagnostics(t *testing.T, output string) []Diagnostic {
279 t.Helper()

Calls 2

HandleNotificationMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected