MCPcopy Index your code
hub / github.com/coder/coder / TestSeedSummary

Function TestSeedSummary

coderd/x/chatd/chatdebug/summary_test.go:49–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestSeedSummary(t *testing.T) {
50 t.Parallel()
51
52 t.Run("NonEmptyLabel", func(t *testing.T) {
53 t.Parallel()
54 got := chatdebug.SeedSummary("hello world")
55 require.Equal(t, map[string]any{"first_message": "hello world"}, got)
56 })
57
58 t.Run("EmptyLabel", func(t *testing.T) {
59 t.Parallel()
60 got := chatdebug.SeedSummary("")
61 require.Nil(t, got)
62 })
63}
64
65func TestExtractFirstUserText(t *testing.T) {
66 t.Parallel()

Callers

nothing calls this directly

Calls 3

SeedSummaryFunction · 0.92
RunMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected