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

Function jsoninate

enterprise/coderd/usage/publisher_test.go:631–639  ·  view source on GitHub ↗
(t *testing.T, v any)

Source from the content-addressed store, hash-verified

629}
630
631func jsoninate(t *testing.T, v any) string {
632 t.Helper()
633 if e, ok := v.(usagetypes.Event); ok {
634 v = e.Fields()
635 }
636 buf, err := json.Marshal(v)
637 require.NoError(t, err)
638 return string(buf)
639}
640
641func configureDeployment(ctx context.Context, t *testing.T, db database.Store) (uuid.UUID, string) {
642 t.Helper()

Callers 5

TestInserterFunction · 0.85
TestIntegrationFunction · 0.85

Calls 3

HelperMethod · 0.65
FieldsMethod · 0.65
MarshalMethod · 0.45

Tested by

no test coverage detected