debugger beta: Fix regression where we sent launch args twice to any dap (#31325)

This regression happens because our tests weren't properly catching this
edge case anymore. I updated the tests to only send the raw config to
the Fake Adapter Client.

Release Notes:

- debugger beta: Fix bug where launch args were sent twice
This commit is contained in:
Anthony Eid
2025-05-24 06:52:36 +00:00
committed by GitHub
parent 7fb9569c15
commit 6f918ed99b
3 changed files with 8 additions and 39 deletions
@@ -1439,13 +1439,7 @@ async fn test_we_send_arguments_from_user_config(
client.on_request::<dap::requests::Launch, _>(move |_, args| {
launch_handler_called.store(true, Ordering::SeqCst);
let obj = args.raw.as_object().unwrap();
let sent_definition = serde_json::from_value::<DebugTaskDefinition>(
obj.get(&"raw_request".to_owned()).unwrap().clone(),
)
.unwrap();
assert_eq!(sent_definition, debug_definition);
assert_eq!(args.raw, debug_definition.config);
Ok(())
});