From bc45b7af3bc93ccd3e4359d29e93417d0af407e1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 10 Apr 2026 09:55:44 +0300 Subject: test(integration): cover each inbox image extension end-to-end Add standalone pipeline tests for .jpg, .jpeg, and .gif (previously only .png was exercised as a lone image). Rename TestImageInput to TestPNGInput and factor shared HTML/asset assertions into assertStandaloneImagePost. Introduce writeSampleJPEG/writeSampleGIF and sampleRGBAImage helpers. Made-with: Cursor --- integrationtests/integration_test.go | 101 +++++++++++++++++++++++++++++++---- 1 file changed, 90 insertions(+), 11 deletions(-) diff --git a/integrationtests/integration_test.go b/integrationtests/integration_test.go index 8d24d8d..0ee0183 100644 --- a/integrationtests/integration_test.go +++ b/integrationtests/integration_test.go @@ -8,6 +8,9 @@ import ( "fmt" "image" "image/color" + "image/color/palette" + "image/gif" + "image/jpeg" "image/png" "os" "path/filepath" @@ -133,19 +136,18 @@ func TestMarkdownInput(t *testing.T) { assertContains(t, index, "

", "index.html markdown h1") } -// TestImageInput verifies image files are processed and embedded in pages. -func TestImageInput(t *testing.T) { - inputDir, outputDir := makeDirs(t) - - writeSamplePNG(t, filepath.Join(inputDir, "photo.png")) - runPipeline(t, inputDir, outputDir) +// assertStandaloneImagePost checks index.html and posts//image.jpg after a lone image input. +func assertStandaloneImagePost(t *testing.T, outputDir string) { + t.Helper() index := readFile(t, filepath.Join(outputDir, "index.html")) assertContains(t, index, `