use super::*;
#[test]
fn test20100_the_initialize_the_daemon_sends_is_the_protocols() {
let dir = tempfile::tempdir().expect("a directory");
let root = AnalysisRoot { dir: dir.path().to_owned(), exclude: vec!["wsb/**".to_owned()] };
let sent = initialize_params(&root).expect("parameters");
let read: lsp_types::InitializeParams = serde_json::from_value(sent.clone()).expect("the protocol's initialize");
let tokens = read.capabilities.text_document.and_then(|t| t.semantic_tokens).expect("semantic tokens are asked for");
assert!(tokens.token_types.iter().any(|t| t.as_str() == "function"), "{sent}");
assert_eq!(sent["initializationOptions"]["exclude"], serde_json::json!(["wsb/**"]));
}