@@ -241,7 +241,7 @@ export function runTests(ctx: RunTestsCtx) {
241241 expect ( res . status ) . toBe ( 200 )
242242 expect ( res . headers . get ( 'content-type' ) ) . toContain ( 'image/gif' )
243243 expect ( res . headers . get ( 'Cache-Control' ) ) . toBe (
244- `public, max-age=0 , must-revalidate`
244+ `public, max-age=${ isDev ? 0 : minimumCacheTTL } , must-revalidate`
245245 )
246246 expect ( res . headers . get ( 'Vary' ) ) . toBe ( 'Accept' )
247247 expect ( res . headers . get ( 'etag' ) ) . toBeTruthy ( )
@@ -258,7 +258,7 @@ export function runTests(ctx: RunTestsCtx) {
258258 expect ( res . status ) . toBe ( 200 )
259259 expect ( res . headers . get ( 'content-type' ) ) . toContain ( 'image/png' )
260260 expect ( res . headers . get ( 'Cache-Control' ) ) . toBe (
261- `public, max-age=0 , must-revalidate`
261+ `public, max-age=${ isDev ? 0 : minimumCacheTTL } , must-revalidate`
262262 )
263263 expect ( res . headers . get ( 'Vary' ) ) . toBe ( 'Accept' )
264264 expect ( res . headers . get ( 'etag' ) ) . toBeTruthy ( )
@@ -275,7 +275,7 @@ export function runTests(ctx: RunTestsCtx) {
275275 expect ( res . status ) . toBe ( 200 )
276276 expect ( res . headers . get ( 'content-type' ) ) . toContain ( 'image/png' )
277277 expect ( res . headers . get ( 'Cache-Control' ) ) . toBe (
278- `public, max-age=0 , must-revalidate`
278+ `public, max-age=${ isDev ? 0 : minimumCacheTTL } , must-revalidate`
279279 )
280280 expect ( res . headers . get ( 'Vary' ) ) . toBe ( 'Accept' )
281281 expect ( res . headers . get ( 'etag' ) ) . toBeTruthy ( )
@@ -292,7 +292,7 @@ export function runTests(ctx: RunTestsCtx) {
292292 expect ( res . status ) . toBe ( 200 )
293293 expect ( res . headers . get ( 'content-type' ) ) . toContain ( 'image/webp' )
294294 expect ( res . headers . get ( 'Cache-Control' ) ) . toBe (
295- `public, max-age=0 , must-revalidate`
295+ `public, max-age=${ isDev ? 0 : minimumCacheTTL } , must-revalidate`
296296 )
297297 expect ( res . headers . get ( 'Vary' ) ) . toBe ( 'Accept' )
298298 expect ( res . headers . get ( 'etag' ) ) . toBeTruthy ( )
@@ -312,7 +312,7 @@ export function runTests(ctx: RunTestsCtx) {
312312 expect ( res . headers . get ( 'Content-Length' ) ) . toBe ( '603' )
313313 expect ( res . headers . get ( 'Content-Type' ) ) . toContain ( 'image/svg+xml' )
314314 expect ( res . headers . get ( 'Cache-Control' ) ) . toBe (
315- `public, max-age=0 , must-revalidate`
315+ `public, max-age=${ isDev ? 0 : minimumCacheTTL } , must-revalidate`
316316 )
317317 // SVG is compressible so will have accept-encoding set from
318318 // compression
0 commit comments