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

Function mustChatLastErrorRawMessage

coderd/x/chatd/chatd_test.go:158–164  ·  view source on GitHub ↗
(t testing.TB, payload codersdk.ChatError)

Source from the content-addressed store, hash-verified

156}
157
158func mustChatLastErrorRawMessage(t testing.TB, payload codersdk.ChatError) pqtype.NullRawMessage {
159 t.Helper()
160
161 encoded, err := json.Marshal(payload)
162 require.NoError(t, err)
163 return pqtype.NullRawMessage{RawMessage: encoded, Valid: true}
164}
165
166func requireChatLastErrorPayload(t testing.TB, raw pqtype.NullRawMessage) codersdk.ChatError {
167 t.Helper()

Callers 1

Calls 2

HelperMethod · 0.65
MarshalMethod · 0.45

Tested by

no test coverage detected