MCPcopy Create free account
hub / github.com/basecamp/hey-cli / TestFormatDateUTC

Function TestFormatDateUTC

internal/cmd/sdk_test.go:39–47  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

37
38func TestFormatTimestampMidDay(t *testing.T) {
39 ts := time.Date(2024, 1, 15, 14, 0, 0, 0, time.UTC)
40 got := formatTimestamp(ts)
41 want := "2024-01-15T14:00"
42 if got != want {
43 t.Errorf("formatTimestamp = %q, want %q", got, want)
44 }
45}
46
47func TestFormatTimestampZero(t *testing.T) {
48 var ts time.Time
49 got := formatTimestamp(ts)
50 if got != "" {

Callers

nothing calls this directly

Calls 1

formatDateFunction · 0.85

Tested by

no test coverage detected