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

Function TestChatCostSummary

coderd/exp_chats_test.go:10194–10208  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10192}
10193
10194func TestChatCostSummary(t *testing.T) {
10195 t.Parallel()
10196
10197 t.Run("BasicSummary", func(t *testing.T) {
10198 t.Parallel()
10199
10200 f := seedChatCostFixture(t)
10201 ctx := testutil.Context(t, testutil.WaitLong)
10202
10203 // Use a window derived from DB timestamps to avoid time boundary flakes.
10204 summary, err := f.Client.GetChatCostSummary(ctx, "me", f.safeOptions())
10205 require.NoError(t, err)
10206 assertChatCostSummary(t, summary, f.ModelConfigID, f.ChatID)
10207 })
10208}
10209
10210func TestChatCostSummary_AfterModelDeletion(t *testing.T) {
10211 t.Parallel()

Callers

nothing calls this directly

Calls 6

ContextFunction · 0.92
seedChatCostFixtureFunction · 0.85
assertChatCostSummaryFunction · 0.85
safeOptionsMethod · 0.80
RunMethod · 0.65
GetChatCostSummaryMethod · 0.65

Tested by

no test coverage detected