MCPcopy Index your code
hub / github.com/github/copilot-sdk / TestResumeSessionRequest_ModeCallbackFlags

Function TestResumeSessionRequest_ModeCallbackFlags

go/client_test.go:2050–2070  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2048}
2049
2050func TestResumeSessionRequest_ModeCallbackFlags(t *testing.T) {
2051 req := resumeSessionRequest{
2052 SessionID: "s1",
2053 RequestExitPlanMode: Bool(true),
2054 RequestAutoModeSwitch: Bool(true),
2055 }
2056 data, err := json.Marshal(req)
2057 if err != nil {
2058 t.Fatalf("Failed to marshal: %v", err)
2059 }
2060 var m map[string]any
2061 if err := json.Unmarshal(data, &m); err != nil {
2062 t.Fatalf("Failed to unmarshal: %v", err)
2063 }
2064 if m["requestExitPlanMode"] != true {
2065 t.Errorf("Expected requestExitPlanMode to be true, got %v", m["requestExitPlanMode"])
2066 }
2067 if m["requestAutoModeSwitch"] != true {
2068 t.Errorf("Expected requestAutoModeSwitch to be true, got %v", m["requestAutoModeSwitch"])
2069 }
2070}
2071
2072func TestModeCallbackRequestHandlers(t *testing.T) {
2073 session := &Session{SessionID: "s1"}

Callers

nothing calls this directly

Calls 2

BoolFunction · 0.85
MarshalMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…