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

Function TestWebRenderTimeout

cli/plugins/webfetch_jsdetect_test.go:117–126  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

115}
116
117func TestWebRenderTimeout(t *testing.T) {
118 t.Setenv("CHATCLI_WEBFETCH_RENDER_TIMEOUT", "7")
119 if got := webRenderTimeout(); got.Seconds() != 7 {
120 t.Errorf("timeout = %v, want 7s", got)
121 }
122 t.Setenv("CHATCLI_WEBFETCH_RENDER_TIMEOUT", "garbage")
123 if got := webRenderTimeout(); got != defaultRenderTimeout {
124 t.Errorf("garbage timeout must fall back to default, got %v", got)
125 }
126}
127
128func TestRenderRequestAllowed_Policy(t *testing.T) {
129 // Non-HTTP schemes never leave the renderer.

Callers

nothing calls this directly

Calls 2

webRenderTimeoutFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected