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

Function TestImageDimensionsFallback

internal/tui/kitty_test.go:70–76  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68func TestRenderImagePlaceholderZero(t *testing.T) {
69 result := renderImagePlaceholder(1, 0, 0)
70 if result != "" {
71 t.Errorf("zero dimensions should return empty string, got %q", result)
72 }
73}
74
75func TestImageDimensionsStaysWithinTheImagesOwnPixels(t *testing.T) {
76 // A logo the size of the one Sentry puts at the top of its notifications.
77 cols, rows := imageDimensions(pngImage(t, 234, 64), 100)
78 if cols != 24 || rows != 3 {
79 t.Errorf("dimensions = (%d, %d), want (24, 3)", cols, rows)

Callers

nothing calls this directly

Calls 1

imageDimensionsFunction · 0.85

Tested by

no test coverage detected