MCPcopy Create free account
hub / github.com/atripati/ark / TestCleanResponseCoding

Function TestCleanResponseCoding

pkg/runtime/quality_test.go:62–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

60}
61
62func TestCleanResponseCoding(t *testing.T) {
63 config := DefaultQualityConfig()
64 input := "Sure! Here is the code:\n```go\nfunc main() {}\n```\n\nLet me know if you have any questions!"
65 result := CleanResponse(input, "coding", config)
66 if strings.Contains(result, "Sure!") {
67 t.Error("should strip 'Sure!' prefix")
68 }
69 if strings.Contains(result, "Let me know") {
70 t.Error("should strip 'Let me know' suffix")
71 }
72 if !strings.Contains(result, "func main()") {
73 t.Error("should preserve code content")
74 }
75}
76
77func TestCleanResponseSummary(t *testing.T) {
78 config := DefaultQualityConfig()

Callers

nothing calls this directly

Calls 3

DefaultQualityConfigFunction · 0.85
CleanResponseFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected