use underscores in the target name for test update notifications

This commit is contained in:
duncan 2025-04-11 14:15:13 +01:00
parent 96925d5105
commit 604d78568c

View file

@ -969,7 +969,9 @@ impl GlobalState {
TestState::Ok => lsp_ext::TestState::Passed,
TestState::Failed { stdout } => lsp_ext::TestState::Failed { message: stdout },
};
let test_id = format!("{}::{name}", message.target.target);
// The notification requires the namespace form (with underscores) of the target
let test_id = format!("{}::{name}", message.target.target.replace('-', "_"));
self.send_notification::<lsp_ext::ChangeTestState>(
lsp_ext::ChangeTestStateParams { test_id, state },