Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jul 1, 2021
1 parent d57a03c commit 4a2e62f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/integration/image-optimizer/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ function runTests({ w, isDev, domains }) {
expect(res.headers.get('Cache-Control')).toBe(
`public, max-age=${isDev ? 0 : 60}, must-revalidate`
)
// SVG is compressible so will have accept-encoding set from
// compression
expect(res.headers.get('Vary')).toMatch(/^Accept(,|$)/)
expect(res.headers.get('etag')).toBeTruthy()
const actual = await res.text()
Expand Down Expand Up @@ -504,7 +506,9 @@ function runTests({ w, isDev, domains }) {
expect(res.headers.get('Cache-Control')).toBe(
`public, max-age=${isDev ? 0 : 60}, must-revalidate`
)
expect(res.headers.get('Vary')).toBe('Accept')
// bmp is compressible so will have accept-encoding set from
// compression
expect(res.headers.get('Vary')).toMatch(/^Accept(,|$)/)
expect(res.headers.get('etag')).toBeTruthy()

const json2 = await fsToJson(imagesDir)
Expand Down

0 comments on commit 4a2e62f

Please sign in to comment.