(t *testing.T)
| 181 | } |
| 182 | |
| 183 | func TestIsChatAgent(t *testing.T) { |
| 184 | t.Parallel() |
| 185 | |
| 186 | tests := []struct { |
| 187 | name string |
| 188 | input string |
| 189 | want bool |
| 190 | }{ |
| 191 | { |
| 192 | name: "ExactSuffix", |
| 193 | input: "agent-coderd-chat", |
| 194 | want: true, |
| 195 | }, |
| 196 | { |
| 197 | name: "UppercaseSuffix", |
| 198 | input: "agent-CODERD-CHAT", |
| 199 | want: true, |
| 200 | }, |
| 201 | { |
| 202 | name: "MixedCaseSuffix", |
| 203 | input: "agent-Coderd-Chat", |
| 204 | want: true, |
| 205 | }, |
| 206 | { |
| 207 | name: "NoSuffix", |
| 208 | input: "my-agent", |
| 209 | want: false, |
| 210 | }, |
| 211 | { |
| 212 | name: "SuffixOnly", |
| 213 | input: "-coderd-chat", |
| 214 | want: true, |
| 215 | }, |
| 216 | { |
| 217 | name: "PartialSuffix", |
| 218 | input: "agent-coderd", |
| 219 | want: false, |
| 220 | }, |
| 221 | } |
| 222 | |
| 223 | for _, tt := range tests { |
| 224 | tt := tt |
| 225 | t.Run(tt.name, func(t *testing.T) { |
| 226 | t.Parallel() |
| 227 | |
| 228 | require.Equal(t, tt.want, agentselect.IsChatAgent(tt.input)) |
| 229 | }) |
| 230 | } |
| 231 | } |
nothing calls this directly
no test coverage detected