MCPcopy Create free account
hub / github.com/diillson/chatcli / TestContextNoAdapter

Function TestContextNoAdapter

cli/plugins/builtin_context_test.go:253–259  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

251}
252
253func TestContextNoAdapter(t *testing.T) {
254 SetContextAdapter(nil)
255 p := NewBuiltinContextPlugin()
256 if _, err := p.Execute(context.Background(), []string{`{"cmd":"list"}`}); err == nil {
257 t.Error("expected error when no adapter is wired")
258 }
259}
260
261func TestContextCapsReadOnly(t *testing.T) {
262 p := NewBuiltinContextPlugin()

Callers

nothing calls this directly

Calls 4

ExecuteMethod · 0.95
SetContextAdapterFunction · 0.85
NewBuiltinContextPluginFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected