MCPcopy Create free account
hub / github.com/estin/simple-completion-language-server / initialize

Function initialize

tests/basic.rs:234–255  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232
233#[test_log::test(tokio::test)]
234async fn initialize() -> anyhow::Result<()> {
235 let mut context = TestContext::default();
236
237 let request = jsonrpc::Request::build("initialize")
238 .id(1)
239 .params(serde_json::json!({"capabilities":{}}))
240 .finish();
241
242 let response = context
243 .request::<ls_types::InitializeResult>(&request)
244 .await?;
245
246 assert!(response.capabilities.completion_provider.is_some());
247 assert_eq!(
248 response.capabilities.text_document_sync,
249 Some(ls_types::TextDocumentSyncCapability::Kind(
250 ls_types::TextDocumentSyncKind::INCREMENTAL,
251 ))
252 );
253
254 Ok(())
255}
256
257#[test_log::test(tokio::test)]
258async fn completion() -> anyhow::Result<()> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected