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

Function withFakeKnowledgeAdapter

cli/plugins/builtin_knowledge_test.go:43–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41}
42
43func withFakeKnowledgeAdapter(t *testing.T) *fakeKnowledgeAdapter {
44 t.Helper()
45 fake := &fakeKnowledgeAdapter{}
46 SetKnowledgeAdapter(fake)
47 t.Cleanup(func() { SetKnowledgeAdapter(nil) })
48 return fake
49}
50
51func TestKnowledgePlugin_DispatchesEnvelope(t *testing.T) {
52 fake := withFakeKnowledgeAdapter(t)

Calls 2

SetKnowledgeAdapterFunction · 0.85
CleanupMethod · 0.45

Tested by

no test coverage detected