Skip to content

Commit 4a2e62f

Browse files
committed
Update test
1 parent d57a03c commit 4a2e62f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/integration/image-optimizer/test/index.test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ function runTests({ w, isDev, domains }) {
9898
expect(res.headers.get('Cache-Control')).toBe(
9999
`public, max-age=${isDev ? 0 : 60}, must-revalidate`
100100
)
101+
// SVG is compressible so will have accept-encoding set from
102+
// compression
101103
expect(res.headers.get('Vary')).toMatch(/^Accept(,|$)/)
102104
expect(res.headers.get('etag')).toBeTruthy()
103105
const actual = await res.text()
@@ -504,7 +506,9 @@ function runTests({ w, isDev, domains }) {
504506
expect(res.headers.get('Cache-Control')).toBe(
505507
`public, max-age=${isDev ? 0 : 60}, must-revalidate`
506508
)
507-
expect(res.headers.get('Vary')).toBe('Accept')
509+
// bmp is compressible so will have accept-encoding set from
510+
// compression
511+
expect(res.headers.get('Vary')).toMatch(/^Accept(,|$)/)
508512
expect(res.headers.get('etag')).toBeTruthy()
509513

510514
const json2 = await fsToJson(imagesDir)

0 commit comments

Comments
 (0)