Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow regex for external domains option #18472

Closed

Conversation

TylerShin
Copy link

// next.config.js
...
images: {
 // make below option work
  domains: [/^cdn/d.mycdn.com$/, "cludinary.cdn.com"],
},

I think RegEx is better than path pattern(with an asterisk(*)) for matching hostname.

@ijjk
Copy link
Member

ijjk commented Oct 29, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
buildDuration 13.3s 13.4s ⚠️ +15ms
nodeModulesSize 91.3 MB 91.3 MB ⚠️ +219 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
/ failed reqs 0 0
/ total time (seconds) 2.532 2.448 -0.08
/ avg req/sec 987.26 1021.42 +34.16
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.302 1.327 ⚠️ +0.02
/error-in-render avg req/sec 1920.6 1883.41 ⚠️ -37.19
Client Bundles (main, webpack, commons)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..3aa9.js gzip 11.3 kB 11.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-fc2ed98..cd2b.js gzip 7.33 kB 7.33 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..dule.js gzip 7.03 kB 7.03 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-20f9619..dule.js gzip 6.31 kB 6.31 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-41ceea0..6b62.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-2d41a89..dule.js gzip 1.31 kB 1.31 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.4 kB 5.4 kB
Client Build Manifests
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
index.html gzip 1 kB 1 kB
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 996 B 996 B
Overall change 3.01 kB 3.01 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
buildDuration 15.4s 15.1s -261ms
nodeModulesSize 91.3 MB 91.3 MB ⚠️ +219 B
Client Bundles (main, webpack, commons)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..3aa9.js gzip 11.3 kB 11.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-fc2ed98..cd2b.js gzip 7.33 kB 7.33 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..dule.js gzip 7.03 kB 7.03 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-20f9619..dule.js gzip 6.31 kB 6.31 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-41ceea0..6b62.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-2d41a89..dule.js gzip 1.31 kB 1.31 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.4 kB 5.4 kB
Client Build Manifests
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_error.js 1.06 MB 1.06 MB
404.html 4.73 kB 4.73 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.06 MB 1.06 MB
link.js 1.11 MB 1.11 MB
routerDirect.js 1.1 MB 1.1 MB
withRouter.js 1.1 MB 1.1 MB
Overall change 5.43 MB 5.43 MB
Commit: 8a72512

@ijjk
Copy link
Member

ijjk commented Oct 29, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
buildDuration 12.7s 13.1s ⚠️ +338ms
nodeModulesSize 91.3 MB 91.3 MB ⚠️ +219 B
Page Load Tests Overall increase ✓
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
/ failed reqs 0 0
/ total time (seconds) 2.405 2.45 ⚠️ +0.05
/ avg req/sec 1039.36 1020.28 ⚠️ -19.08
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.285 1.253 -0.03
/error-in-render avg req/sec 1945.55 1995.53 +49.98
Client Bundles (main, webpack, commons)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..3aa9.js gzip 11.3 kB 11.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-fc2ed98..cd2b.js gzip 7.33 kB 7.33 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..dule.js gzip 7.03 kB 7.03 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-20f9619..dule.js gzip 6.31 kB 6.31 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-41ceea0..6b62.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-2d41a89..dule.js gzip 1.31 kB 1.31 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.4 kB 5.4 kB
Client Build Manifests
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
index.html gzip 1 kB 1 kB
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 996 B 996 B
Overall change 3.01 kB 3.01 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
buildDuration 14.6s 14.5s -102ms
nodeModulesSize 91.3 MB 91.3 MB ⚠️ +219 B
Client Bundles (main, webpack, commons)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..3aa9.js gzip 11.3 kB 11.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-fc2ed98..cd2b.js gzip 7.33 kB 7.33 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..dule.js gzip 7.03 kB 7.03 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-20f9619..dule.js gzip 6.31 kB 6.31 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-41ceea0..6b62.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-2d41a89..dule.js gzip 1.31 kB 1.31 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.4 kB 5.4 kB
Client Build Manifests
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_error.js 1.06 MB 1.06 MB
404.html 4.73 kB 4.73 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.06 MB 1.06 MB
link.js 1.11 MB 1.11 MB
routerDirect.js 1.1 MB 1.1 MB
withRouter.js 1.1 MB 1.1 MB
Overall change 5.43 MB 5.43 MB
Commit: 09d1687

@ijjk
Copy link
Member

ijjk commented Oct 29, 2020

Failing test suites

Commit: 09d1687

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

  • Image Optimizer > Server support w/o next.config.js > should return home page
  • Image Optimizer > Server support w/o next.config.js > should maintain animated gif
  • Image Optimizer > Server support w/o next.config.js > should maintain animated png
  • Image Optimizer > Server support w/o next.config.js > should maintain animated webp
  • Image Optimizer > Server support w/o next.config.js > should maintain vector svg
  • Image Optimizer > Server support w/o next.config.js > should fail when url is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when w is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when q is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when q is greater than 100
  • Image Optimizer > Server support w/o next.config.js > should fail when q is less than 1
  • Image Optimizer > Server support w/o next.config.js > should fail when w is 0 or less
  • Image Optimizer > Server support w/o next.config.js > should fail when w is not a number
  • Image Optimizer > Server support w/o next.config.js > should fail when q is not a number
  • Image Optimizer > Server support w/o next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Server support w/o next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and png accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Server support w/o next.config.js > should fail when url has file protocol
  • Image Optimizer > Server support w/o next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Server support w/o next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Server support w/o next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Server support w/o next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > Server support with next.config.js > should return home page
  • Image Optimizer > Server support with next.config.js > should maintain animated gif
  • Image Optimizer > Server support with next.config.js > should maintain animated png
  • Image Optimizer > Server support with next.config.js > should maintain animated webp
  • Image Optimizer > Server support with next.config.js > should maintain vector svg
  • Image Optimizer > Server support with next.config.js > should fail when url is missing
  • Image Optimizer > Server support with next.config.js > should fail when w is missing
  • Image Optimizer > Server support with next.config.js > should fail when q is missing
  • Image Optimizer > Server support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > Server support with next.config.js > should fail when q is less than 1
  • Image Optimizer > Server support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > Server support with next.config.js > should fail when w is not a number
  • Image Optimizer > Server support with next.config.js > should fail when q is not a number
  • Image Optimizer > Server support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Server support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Server support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Server support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Server support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > Server support with next.config.js > should fail when url has file protocol
  • Image Optimizer > Server support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Server support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > Server support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Server support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Server support with next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > Serverless support with next.config.js > should return home page
  • Image Optimizer > Serverless support with next.config.js > should maintain animated gif
  • Image Optimizer > Serverless support with next.config.js > should maintain animated png
  • Image Optimizer > Serverless support with next.config.js > should maintain animated webp
  • Image Optimizer > Serverless support with next.config.js > should maintain vector svg
  • Image Optimizer > Serverless support with next.config.js > should fail when url is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when w is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when q is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > Serverless support with next.config.js > should fail when q is less than 1
  • Image Optimizer > Serverless support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > Serverless support with next.config.js > should fail when w is not a number
  • Image Optimizer > Serverless support with next.config.js > should fail when q is not a number
  • Image Optimizer > Serverless support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Serverless support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Serverless support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > Serverless support with next.config.js > should fail when url has file protocol
  • Image Optimizer > Serverless support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Serverless support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > Serverless support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Serverless support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Serverless support with next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > config checks > should error when domains length exceeds 50
  • Image Optimizer > config checks > should error when sizes length exceeds 25
  • Image Optimizer > config checks > should error when deviceSizes contains invalid widths
  • Image Optimizer > config checks > should error when imageSizes contains invalid widths
  • Image Optimizer > dev support next.config.js cloudinary loader > should 404 when loader is not default
  • Image Optimizer > dev support w/o next.config.js > should return home page
  • Image Optimizer > dev support w/o next.config.js > should maintain animated gif
  • Image Optimizer > dev support w/o next.config.js > should maintain animated png
  • Image Optimizer > dev support w/o next.config.js > should maintain animated webp
  • Image Optimizer > dev support w/o next.config.js > should maintain vector svg
  • Image Optimizer > dev support w/o next.config.js > should fail when url is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when w is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when q is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when q is greater than 100
  • Image Optimizer > dev support w/o next.config.js > should fail when q is less than 1
  • Image Optimizer > dev support w/o next.config.js > should fail when w is 0 or less
  • Image Optimizer > dev support w/o next.config.js > should fail when w is not a number
  • Image Optimizer > dev support w/o next.config.js > should fail when q is not a number
  • Image Optimizer > dev support w/o next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > dev support w/o next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and webp accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and png accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > dev support w/o next.config.js > should fail when url has file protocol
  • Image Optimizer > dev support w/o next.config.js > should fail when url has ftp protocol
  • Image Optimizer > dev support w/o next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > dev support w/o next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > dev support w/o next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > dev support with next.config.js > should return home page
  • Image Optimizer > dev support with next.config.js > should maintain animated gif
  • Image Optimizer > dev support with next.config.js > should maintain animated png
  • Image Optimizer > dev support with next.config.js > should maintain animated webp
  • Image Optimizer > dev support with next.config.js > should maintain vector svg
  • Image Optimizer > dev support with next.config.js > should fail when url is missing
  • Image Optimizer > dev support with next.config.js > should fail when w is missing
  • Image Optimizer > dev support with next.config.js > should fail when q is missing
  • Image Optimizer > dev support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > dev support with next.config.js > should fail when q is less than 1
  • Image Optimizer > dev support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > dev support with next.config.js > should fail when w is not a number
  • Image Optimizer > dev support with next.config.js > should fail when q is not a number
  • Image Optimizer > dev support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > dev support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > dev support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > dev support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > dev support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > dev support with next.config.js > should fail when url has file protocol
  • Image Optimizer > dev support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > dev support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > dev support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > dev support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > dev support with next.config.js > should not resize if requested width is larger than original source image
Expand output

● Image Optimizer › config checks › should error when domains length exceeds 50

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:327:24)

● Image Optimizer › config checks › should error when sizes length exceeds 25

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:352:24)

● Image Optimizer › config checks › should error when deviceSizes contains invalid widths

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:377:24)

● Image Optimizer › config checks › should error when imageSizes contains invalid widths

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:402:24)

● Image Optimizer › dev support w/o next.config.js › should return home page

FetchError: request to http://localhost:33035/ failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated gif

FetchError: request to http://localhost:33035/_next/image?w=320&q=90&url=%2Fanimated.gif failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated png

FetchError: request to http://localhost:33035/_next/image?w=320&q=90&url=%2Fanimated.png failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated webp

FetchError: request to http://localhost:33035/_next/image?w=320&q=90&url=%2Fanimated.webp failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain vector svg

FetchError: request to http://localhost:33035/_next/image?w=320&q=90&url=%2Ftest.svg failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url is missing

FetchError: request to http://localhost:33035/_next/image?w=320&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is missing

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is missing

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=320 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is greater than 100

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=320&q=101 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is less than 1

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=320&q=0 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is 0 or less

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=0&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is not a number

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=foo&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is not a number

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=320&q=foo failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when domain is not defined in next.config.js

FetchError: request to http://localhost:33035/_next/image?url=http%3A%2F%2Fvercel.com%2Fbutton&w=320&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when width is not in next.config.js

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=1000&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and webp accept header

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and jpeg accept header

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and png accept header

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as png

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as gif

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.gif&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as tiff

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.tiff&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and wildcard accept header as webp

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url has file protocol

FetchError: request to http://localhost:33035/_next/image?url=file%3A%2F%2Flocalhost%3A33035%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url has ftp protocol

FetchError: request to http://localhost:33035/_next/image?url=ftp%3A%2F%2Flocalhost%3A33035%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should use cached image file when parameters are the same

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should proxy-pass unsupported image types and should not cache file

ENOENT: no such file or directory, scandir '/home/runner/work/next.js/next.js/test/integration/image-optimizer/.next/cache/images'

● Image Optimizer › dev support w/o next.config.js › should not resize if requested width is larger than original source image

FetchError: request to http://localhost:33035/_next/image?url=%2Ftest.jpg&w=1024&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:33035

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › Server support w/o next.config.js › should return home page

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated gif

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated png

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated webp

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain vector svg

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is greater than 100

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is less than 1

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is 0 or less

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is not a number

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is not a number

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when domain is not defined in next.config.js

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when width is not in next.config.js

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and webp accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and jpeg accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and png accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as png

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as gif

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as tiff

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and wildcard accept header as webp

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url has file protocol

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url has ftp protocol

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should use cached image file when parameters are the same

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should proxy-pass unsupported image types and should not cache file

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should not resize if requested width is larger than original source image

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Serverless support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › dev support next.config.js cloudinary loader › should 404 when loader is not default

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:537:18

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:437:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:459:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:475:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:497:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:521:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:542:13

@ijjk
Copy link
Member

ijjk commented Oct 29, 2020

Failing test suites

Commit: a638192

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

  • Image Optimizer > Server support w/o next.config.js > should return home page
  • Image Optimizer > Server support w/o next.config.js > should maintain animated gif
  • Image Optimizer > Server support w/o next.config.js > should maintain animated png
  • Image Optimizer > Server support w/o next.config.js > should maintain animated webp
  • Image Optimizer > Server support w/o next.config.js > should maintain vector svg
  • Image Optimizer > Server support w/o next.config.js > should fail when url is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when w is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when q is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when q is greater than 100
  • Image Optimizer > Server support w/o next.config.js > should fail when q is less than 1
  • Image Optimizer > Server support w/o next.config.js > should fail when w is 0 or less
  • Image Optimizer > Server support w/o next.config.js > should fail when w is not a number
  • Image Optimizer > Server support w/o next.config.js > should fail when q is not a number
  • Image Optimizer > Server support w/o next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Server support w/o next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and png accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Server support w/o next.config.js > should fail when url has file protocol
  • Image Optimizer > Server support w/o next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Server support w/o next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Server support w/o next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Server support w/o next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > Server support with next.config.js > should return home page
  • Image Optimizer > Server support with next.config.js > should maintain animated gif
  • Image Optimizer > Server support with next.config.js > should maintain animated png
  • Image Optimizer > Server support with next.config.js > should maintain animated webp
  • Image Optimizer > Server support with next.config.js > should maintain vector svg
  • Image Optimizer > Server support with next.config.js > should fail when url is missing
  • Image Optimizer > Server support with next.config.js > should fail when w is missing
  • Image Optimizer > Server support with next.config.js > should fail when q is missing
  • Image Optimizer > Server support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > Server support with next.config.js > should fail when q is less than 1
  • Image Optimizer > Server support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > Server support with next.config.js > should fail when w is not a number
  • Image Optimizer > Server support with next.config.js > should fail when q is not a number
  • Image Optimizer > Server support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Server support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Server support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Server support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Server support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > Server support with next.config.js > should fail when url has file protocol
  • Image Optimizer > Server support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Server support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > Server support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Server support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Server support with next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > Serverless support with next.config.js > should return home page
  • Image Optimizer > Serverless support with next.config.js > should maintain animated gif
  • Image Optimizer > Serverless support with next.config.js > should maintain animated png
  • Image Optimizer > Serverless support with next.config.js > should maintain animated webp
  • Image Optimizer > Serverless support with next.config.js > should maintain vector svg
  • Image Optimizer > Serverless support with next.config.js > should fail when url is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when w is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when q is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > Serverless support with next.config.js > should fail when q is less than 1
  • Image Optimizer > Serverless support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > Serverless support with next.config.js > should fail when w is not a number
  • Image Optimizer > Serverless support with next.config.js > should fail when q is not a number
  • Image Optimizer > Serverless support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Serverless support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Serverless support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > Serverless support with next.config.js > should fail when url has file protocol
  • Image Optimizer > Serverless support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Serverless support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > Serverless support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Serverless support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Serverless support with next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > config checks > should error when domains length exceeds 50
  • Image Optimizer > config checks > should error when sizes length exceeds 25
  • Image Optimizer > config checks > should error when deviceSizes contains invalid widths
  • Image Optimizer > config checks > should error when imageSizes contains invalid widths
  • Image Optimizer > dev support next.config.js cloudinary loader > should 404 when loader is not default
  • Image Optimizer > dev support w/o next.config.js > should return home page
  • Image Optimizer > dev support w/o next.config.js > should maintain animated gif
  • Image Optimizer > dev support w/o next.config.js > should maintain animated png
  • Image Optimizer > dev support w/o next.config.js > should maintain animated webp
  • Image Optimizer > dev support w/o next.config.js > should maintain vector svg
  • Image Optimizer > dev support w/o next.config.js > should fail when url is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when w is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when q is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when q is greater than 100
  • Image Optimizer > dev support w/o next.config.js > should fail when q is less than 1
  • Image Optimizer > dev support w/o next.config.js > should fail when w is 0 or less
  • Image Optimizer > dev support w/o next.config.js > should fail when w is not a number
  • Image Optimizer > dev support w/o next.config.js > should fail when q is not a number
  • Image Optimizer > dev support w/o next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > dev support w/o next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and webp accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and png accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > dev support w/o next.config.js > should fail when url has file protocol
  • Image Optimizer > dev support w/o next.config.js > should fail when url has ftp protocol
  • Image Optimizer > dev support w/o next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > dev support w/o next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > dev support w/o next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > dev support with next.config.js > should return home page
  • Image Optimizer > dev support with next.config.js > should maintain animated gif
  • Image Optimizer > dev support with next.config.js > should maintain animated png
  • Image Optimizer > dev support with next.config.js > should maintain animated webp
  • Image Optimizer > dev support with next.config.js > should maintain vector svg
  • Image Optimizer > dev support with next.config.js > should fail when url is missing
  • Image Optimizer > dev support with next.config.js > should fail when w is missing
  • Image Optimizer > dev support with next.config.js > should fail when q is missing
  • Image Optimizer > dev support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > dev support with next.config.js > should fail when q is less than 1
  • Image Optimizer > dev support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > dev support with next.config.js > should fail when w is not a number
  • Image Optimizer > dev support with next.config.js > should fail when q is not a number
  • Image Optimizer > dev support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > dev support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > dev support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > dev support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > dev support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > dev support with next.config.js > should fail when url has file protocol
  • Image Optimizer > dev support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > dev support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > dev support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > dev support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > dev support with next.config.js > should not resize if requested width is larger than original source image
Expand output

● Image Optimizer › config checks › should error when domains length exceeds 50

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:327:24)

● Image Optimizer › config checks › should error when sizes length exceeds 25

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:352:24)

● Image Optimizer › config checks › should error when deviceSizes contains invalid widths

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:377:24)

● Image Optimizer › config checks › should error when imageSizes contains invalid widths

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:402:24)

● Image Optimizer › dev support w/o next.config.js › should return home page

FetchError: request to http://localhost:39669/ failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated gif

FetchError: request to http://localhost:39669/_next/image?w=320&q=90&url=%2Fanimated.gif failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated png

FetchError: request to http://localhost:39669/_next/image?w=320&q=90&url=%2Fanimated.png failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated webp

FetchError: request to http://localhost:39669/_next/image?w=320&q=90&url=%2Fanimated.webp failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain vector svg

FetchError: request to http://localhost:39669/_next/image?w=320&q=90&url=%2Ftest.svg failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url is missing

FetchError: request to http://localhost:39669/_next/image?w=320&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is missing

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is missing

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=320 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is greater than 100

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=320&q=101 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is less than 1

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=320&q=0 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is 0 or less

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=0&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is not a number

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=foo&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is not a number

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=320&q=foo failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when domain is not defined in next.config.js

FetchError: request to http://localhost:39669/_next/image?url=http%3A%2F%2Fvercel.com%2Fbutton&w=320&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when width is not in next.config.js

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=1000&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and webp accept header

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and jpeg accept header

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and png accept header

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as png

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as gif

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.gif&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as tiff

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.tiff&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and wildcard accept header as webp

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url has file protocol

FetchError: request to http://localhost:39669/_next/image?url=file%3A%2F%2Flocalhost%3A39669%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url has ftp protocol

FetchError: request to http://localhost:39669/_next/image?url=ftp%3A%2F%2Flocalhost%3A39669%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should use cached image file when parameters are the same

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should proxy-pass unsupported image types and should not cache file

ENOENT: no such file or directory, scandir '/home/runner/work/next.js/next.js/test/integration/image-optimizer/.next/cache/images'

● Image Optimizer › dev support w/o next.config.js › should not resize if requested width is larger than original source image

FetchError: request to http://localhost:39669/_next/image?url=%2Ftest.jpg&w=1024&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39669

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › Server support w/o next.config.js › should return home page

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated gif

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated png

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated webp

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain vector svg

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is greater than 100

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is less than 1

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is 0 or less

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is not a number

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is not a number

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when domain is not defined in next.config.js

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when width is not in next.config.js

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and webp accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and jpeg accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and png accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as png

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as gif

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as tiff

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and wildcard accept header as webp

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url has file protocol

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url has ftp protocol

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should use cached image file when parameters are the same

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should proxy-pass unsupported image types and should not cache file

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should not resize if requested width is larger than original source image

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Serverless support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › dev support next.config.js cloudinary loader › should 404 when loader is not default

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:537:18

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:437:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:459:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:475:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:497:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:521:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:542:13

@ijjk
Copy link
Member

ijjk commented Oct 29, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
buildDuration 12.8s 12.6s -205ms
nodeModulesSize 91.3 MB 91.3 MB ⚠️ +719 B
Page Load Tests Overall increase ✓
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
/ failed reqs 0 0
/ total time (seconds) 2.375 2.329 -0.05
/ avg req/sec 1052.45 1073.21 +20.76
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.255 1.211 -0.04
/error-in-render avg req/sec 1991.76 2064.68 +72.92
Client Bundles (main, webpack, commons)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..3aa9.js gzip 11.3 kB 11.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-7f1864f..ae19.js gzip 7.35 kB 7.35 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..dule.js gzip 7.03 kB 7.03 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-6865226..dule.js gzip 6.33 kB 6.33 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-41ceea0..6b62.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-2d41a89..dule.js gzip 1.31 kB 1.31 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.4 kB 5.4 kB
Client Build Manifests
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
index.html gzip 1 kB 1 kB
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 996 B 996 B
Overall change 3.01 kB 3.01 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
buildDuration 14.6s 14.4s -170ms
nodeModulesSize 91.3 MB 91.3 MB ⚠️ +719 B
Client Bundles (main, webpack, commons)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..3aa9.js gzip 11.3 kB 11.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-7f1864f..ae19.js gzip 7.35 kB 7.35 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..dule.js gzip 7.03 kB 7.03 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-6865226..dule.js gzip 6.33 kB 6.33 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-41ceea0..6b62.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-2d41a89..dule.js gzip 1.31 kB 1.31 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.4 kB 5.4 kB
Client Build Manifests
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_error.js 1.06 MB 1.06 MB
404.html 4.73 kB 4.73 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.06 MB 1.06 MB
link.js 1.11 MB 1.11 MB
routerDirect.js 1.1 MB 1.1 MB
withRouter.js 1.1 MB 1.1 MB
Overall change 5.43 MB 5.43 MB
Commit: 73c91c8

@ijjk
Copy link
Member

ijjk commented Oct 29, 2020

Failing test suites

Commit: 73c91c8

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

  • Image Optimizer > Server support w/o next.config.js > should return home page
  • Image Optimizer > Server support w/o next.config.js > should maintain animated gif
  • Image Optimizer > Server support w/o next.config.js > should maintain animated png
  • Image Optimizer > Server support w/o next.config.js > should maintain animated webp
  • Image Optimizer > Server support w/o next.config.js > should maintain vector svg
  • Image Optimizer > Server support w/o next.config.js > should fail when url is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when w is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when q is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when q is greater than 100
  • Image Optimizer > Server support w/o next.config.js > should fail when q is less than 1
  • Image Optimizer > Server support w/o next.config.js > should fail when w is 0 or less
  • Image Optimizer > Server support w/o next.config.js > should fail when w is not a number
  • Image Optimizer > Server support w/o next.config.js > should fail when q is not a number
  • Image Optimizer > Server support w/o next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Server support w/o next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and png accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Server support w/o next.config.js > should fail when url has file protocol
  • Image Optimizer > Server support w/o next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Server support w/o next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Server support w/o next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Server support w/o next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > Server support with next.config.js > should return home page
  • Image Optimizer > Server support with next.config.js > should maintain animated gif
  • Image Optimizer > Server support with next.config.js > should maintain animated png
  • Image Optimizer > Server support with next.config.js > should maintain animated webp
  • Image Optimizer > Server support with next.config.js > should maintain vector svg
  • Image Optimizer > Server support with next.config.js > should fail when url is missing
  • Image Optimizer > Server support with next.config.js > should fail when w is missing
  • Image Optimizer > Server support with next.config.js > should fail when q is missing
  • Image Optimizer > Server support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > Server support with next.config.js > should fail when q is less than 1
  • Image Optimizer > Server support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > Server support with next.config.js > should fail when w is not a number
  • Image Optimizer > Server support with next.config.js > should fail when q is not a number
  • Image Optimizer > Server support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Server support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Server support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Server support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Server support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > Server support with next.config.js > should fail when url has file protocol
  • Image Optimizer > Server support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Server support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > Server support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Server support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Server support with next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > Serverless support with next.config.js > should return home page
  • Image Optimizer > Serverless support with next.config.js > should maintain animated gif
  • Image Optimizer > Serverless support with next.config.js > should maintain animated png
  • Image Optimizer > Serverless support with next.config.js > should maintain animated webp
  • Image Optimizer > Serverless support with next.config.js > should maintain vector svg
  • Image Optimizer > Serverless support with next.config.js > should fail when url is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when w is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when q is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > Serverless support with next.config.js > should fail when q is less than 1
  • Image Optimizer > Serverless support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > Serverless support with next.config.js > should fail when w is not a number
  • Image Optimizer > Serverless support with next.config.js > should fail when q is not a number
  • Image Optimizer > Serverless support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Serverless support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Serverless support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > Serverless support with next.config.js > should fail when url has file protocol
  • Image Optimizer > Serverless support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Serverless support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > Serverless support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Serverless support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Serverless support with next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > config checks > should error when domains length exceeds 50
  • Image Optimizer > config checks > should error when sizes length exceeds 25
  • Image Optimizer > config checks > should error when deviceSizes contains invalid widths
  • Image Optimizer > config checks > should error when imageSizes contains invalid widths
  • Image Optimizer > dev support next.config.js cloudinary loader > should 404 when loader is not default
  • Image Optimizer > dev support w/o next.config.js > should return home page
  • Image Optimizer > dev support w/o next.config.js > should maintain animated gif
  • Image Optimizer > dev support w/o next.config.js > should maintain animated png
  • Image Optimizer > dev support w/o next.config.js > should maintain animated webp
  • Image Optimizer > dev support w/o next.config.js > should maintain vector svg
  • Image Optimizer > dev support w/o next.config.js > should fail when url is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when w is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when q is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when q is greater than 100
  • Image Optimizer > dev support w/o next.config.js > should fail when q is less than 1
  • Image Optimizer > dev support w/o next.config.js > should fail when w is 0 or less
  • Image Optimizer > dev support w/o next.config.js > should fail when w is not a number
  • Image Optimizer > dev support w/o next.config.js > should fail when q is not a number
  • Image Optimizer > dev support w/o next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > dev support w/o next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and webp accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and png accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > dev support w/o next.config.js > should fail when url has file protocol
  • Image Optimizer > dev support w/o next.config.js > should fail when url has ftp protocol
  • Image Optimizer > dev support w/o next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > dev support w/o next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > dev support w/o next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > dev support with next.config.js > should return home page
  • Image Optimizer > dev support with next.config.js > should maintain animated gif
  • Image Optimizer > dev support with next.config.js > should maintain animated png
  • Image Optimizer > dev support with next.config.js > should maintain animated webp
  • Image Optimizer > dev support with next.config.js > should maintain vector svg
  • Image Optimizer > dev support with next.config.js > should fail when url is missing
  • Image Optimizer > dev support with next.config.js > should fail when w is missing
  • Image Optimizer > dev support with next.config.js > should fail when q is missing
  • Image Optimizer > dev support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > dev support with next.config.js > should fail when q is less than 1
  • Image Optimizer > dev support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > dev support with next.config.js > should fail when w is not a number
  • Image Optimizer > dev support with next.config.js > should fail when q is not a number
  • Image Optimizer > dev support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > dev support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > dev support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > dev support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > dev support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > dev support with next.config.js > should fail when url has file protocol
  • Image Optimizer > dev support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > dev support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > dev support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > dev support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > dev support with next.config.js > should not resize if requested width is larger than original source image
Expand output

● Image Optimizer › config checks › should error when domains length exceeds 50

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:327:24)

● Image Optimizer › config checks › should error when sizes length exceeds 25

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:352:24)

● Image Optimizer › config checks › should error when deviceSizes contains invalid widths

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:377:24)

● Image Optimizer › config checks › should error when imageSizes contains invalid widths

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:402:24)

● Image Optimizer › dev support w/o next.config.js › should return home page

FetchError: request to http://localhost:39065/ failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated gif

FetchError: request to http://localhost:39065/_next/image?w=320&q=90&url=%2Fanimated.gif failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated png

FetchError: request to http://localhost:39065/_next/image?w=320&q=90&url=%2Fanimated.png failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated webp

FetchError: request to http://localhost:39065/_next/image?w=320&q=90&url=%2Fanimated.webp failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain vector svg

FetchError: request to http://localhost:39065/_next/image?w=320&q=90&url=%2Ftest.svg failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url is missing

FetchError: request to http://localhost:39065/_next/image?w=320&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is missing

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is missing

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=320 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is greater than 100

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=320&q=101 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is less than 1

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=320&q=0 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is 0 or less

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=0&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is not a number

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=foo&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is not a number

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=320&q=foo failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when domain is not defined in next.config.js

FetchError: request to http://localhost:39065/_next/image?url=http%3A%2F%2Fvercel.com%2Fbutton&w=320&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when width is not in next.config.js

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=1000&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and webp accept header

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and jpeg accept header

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and png accept header

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as png

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as gif

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.gif&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as tiff

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.tiff&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and wildcard accept header as webp

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url has file protocol

FetchError: request to http://localhost:39065/_next/image?url=file%3A%2F%2Flocalhost%3A39065%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url has ftp protocol

FetchError: request to http://localhost:39065/_next/image?url=ftp%3A%2F%2Flocalhost%3A39065%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should use cached image file when parameters are the same

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should proxy-pass unsupported image types and should not cache file

ENOENT: no such file or directory, scandir '/home/runner/work/next.js/next.js/test/integration/image-optimizer/.next/cache/images'

● Image Optimizer › dev support w/o next.config.js › should not resize if requested width is larger than original source image

FetchError: request to http://localhost:39065/_next/image?url=%2Ftest.jpg&w=1024&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:39065

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › Server support w/o next.config.js › should return home page

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated gif

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated png

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated webp

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain vector svg

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is greater than 100

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is less than 1

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is 0 or less

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is not a number

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is not a number

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when domain is not defined in next.config.js

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when width is not in next.config.js

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and webp accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and jpeg accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and png accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as png

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as gif

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as tiff

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and wildcard accept header as webp

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url has file protocol

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url has ftp protocol

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should use cached image file when parameters are the same

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should proxy-pass unsupported image types and should not cache file

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should not resize if requested width is larger than original source image

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Serverless support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › dev support next.config.js cloudinary loader › should 404 when loader is not default

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:537:18

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:437:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:459:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:475:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:497:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:521:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:542:13

@ijjk
Copy link
Member

ijjk commented Oct 30, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
buildDuration 13.2s 13.2s -35ms
nodeModulesSize 91.3 MB 91.3 MB ⚠️ +719 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
/ failed reqs 0 0
/ total time (seconds) 2.682 2.603 -0.08
/ avg req/sec 932.14 960.41 +28.27
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.342 1.413 ⚠️ +0.07
/error-in-render avg req/sec 1862.5 1769.65 ⚠️ -92.85
Client Bundles (main, webpack, commons)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..3aa9.js gzip 11.3 kB 11.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-2bc1e97..bed6.js gzip 7.35 kB 7.35 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..dule.js gzip 7.03 kB 7.03 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-8cad9cc..dule.js gzip 6.33 kB 6.33 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-41ceea0..6b62.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-2d41a89..dule.js gzip 1.31 kB 1.31 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.4 kB 5.4 kB
Client Build Manifests
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
index.html gzip 1 kB 1 kB
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 995 B 995 B
Overall change 3.01 kB 3.01 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
buildDuration 15.2s 15.5s ⚠️ +326ms
nodeModulesSize 91.3 MB 91.3 MB ⚠️ +719 B
Client Bundles (main, webpack, commons)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..3aa9.js gzip 11.3 kB 11.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-2bc1e97..bed6.js gzip 7.35 kB 7.35 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..dule.js gzip 7.03 kB 7.03 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-8cad9cc..dule.js gzip 6.33 kB 6.33 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-41ceea0..6b62.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-2d41a89..dule.js gzip 1.31 kB 1.31 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.4 kB 5.4 kB
Client Build Manifests
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_error.js 1.06 MB 1.06 MB
404.html 4.73 kB 4.73 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.06 MB 1.06 MB
link.js 1.11 MB 1.11 MB
routerDirect.js 1.1 MB 1.1 MB
withRouter.js 1.1 MB 1.1 MB
Overall change 5.43 MB 5.43 MB
Commit: bf77450

@ijjk
Copy link
Member

ijjk commented Oct 30, 2020

Failing test suites

Commit: bf77450

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

  • Image Optimizer > Server support w/o next.config.js > should return home page
  • Image Optimizer > Server support w/o next.config.js > should maintain animated gif
  • Image Optimizer > Server support w/o next.config.js > should maintain animated png
  • Image Optimizer > Server support w/o next.config.js > should maintain animated webp
  • Image Optimizer > Server support w/o next.config.js > should maintain vector svg
  • Image Optimizer > Server support w/o next.config.js > should fail when url is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when w is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when q is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when q is greater than 100
  • Image Optimizer > Server support w/o next.config.js > should fail when q is less than 1
  • Image Optimizer > Server support w/o next.config.js > should fail when w is 0 or less
  • Image Optimizer > Server support w/o next.config.js > should fail when w is not a number
  • Image Optimizer > Server support w/o next.config.js > should fail when q is not a number
  • Image Optimizer > Server support w/o next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Server support w/o next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and png accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Server support w/o next.config.js > should fail when url has file protocol
  • Image Optimizer > Server support w/o next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Server support w/o next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Server support w/o next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Server support w/o next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > Server support with next.config.js > should return home page
  • Image Optimizer > Server support with next.config.js > should maintain animated gif
  • Image Optimizer > Server support with next.config.js > should maintain animated png
  • Image Optimizer > Server support with next.config.js > should maintain animated webp
  • Image Optimizer > Server support with next.config.js > should maintain vector svg
  • Image Optimizer > Server support with next.config.js > should fail when url is missing
  • Image Optimizer > Server support with next.config.js > should fail when w is missing
  • Image Optimizer > Server support with next.config.js > should fail when q is missing
  • Image Optimizer > Server support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > Server support with next.config.js > should fail when q is less than 1
  • Image Optimizer > Server support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > Server support with next.config.js > should fail when w is not a number
  • Image Optimizer > Server support with next.config.js > should fail when q is not a number
  • Image Optimizer > Server support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Server support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Server support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Server support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Server support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > Server support with next.config.js > should fail when url has file protocol
  • Image Optimizer > Server support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Server support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > Server support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Server support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Server support with next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > Serverless support with next.config.js > should return home page
  • Image Optimizer > Serverless support with next.config.js > should maintain animated gif
  • Image Optimizer > Serverless support with next.config.js > should maintain animated png
  • Image Optimizer > Serverless support with next.config.js > should maintain animated webp
  • Image Optimizer > Serverless support with next.config.js > should maintain vector svg
  • Image Optimizer > Serverless support with next.config.js > should fail when url is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when w is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when q is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > Serverless support with next.config.js > should fail when q is less than 1
  • Image Optimizer > Serverless support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > Serverless support with next.config.js > should fail when w is not a number
  • Image Optimizer > Serverless support with next.config.js > should fail when q is not a number
  • Image Optimizer > Serverless support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Serverless support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > Serverless support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > Serverless support with next.config.js > should fail when url has file protocol
  • Image Optimizer > Serverless support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Serverless support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > Serverless support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Serverless support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Serverless support with next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > config checks > should error when domains length exceeds 50
  • Image Optimizer > config checks > should error when sizes length exceeds 25
  • Image Optimizer > config checks > should error when deviceSizes contains invalid widths
  • Image Optimizer > config checks > should error when imageSizes contains invalid widths
  • Image Optimizer > dev support next.config.js cloudinary loader > should 404 when loader is not default
  • Image Optimizer > dev support w/o next.config.js > should return home page
  • Image Optimizer > dev support w/o next.config.js > should maintain animated gif
  • Image Optimizer > dev support w/o next.config.js > should maintain animated png
  • Image Optimizer > dev support w/o next.config.js > should maintain animated webp
  • Image Optimizer > dev support w/o next.config.js > should maintain vector svg
  • Image Optimizer > dev support w/o next.config.js > should fail when url is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when w is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when q is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when q is greater than 100
  • Image Optimizer > dev support w/o next.config.js > should fail when q is less than 1
  • Image Optimizer > dev support w/o next.config.js > should fail when w is 0 or less
  • Image Optimizer > dev support w/o next.config.js > should fail when w is not a number
  • Image Optimizer > dev support w/o next.config.js > should fail when q is not a number
  • Image Optimizer > dev support w/o next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > dev support w/o next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and webp accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and png accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > dev support w/o next.config.js > should fail when url has file protocol
  • Image Optimizer > dev support w/o next.config.js > should fail when url has ftp protocol
  • Image Optimizer > dev support w/o next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > dev support w/o next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > dev support w/o next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > dev support with next.config.js > should return home page
  • Image Optimizer > dev support with next.config.js > should maintain animated gif
  • Image Optimizer > dev support with next.config.js > should maintain animated png
  • Image Optimizer > dev support with next.config.js > should maintain animated webp
  • Image Optimizer > dev support with next.config.js > should maintain vector svg
  • Image Optimizer > dev support with next.config.js > should fail when url is missing
  • Image Optimizer > dev support with next.config.js > should fail when w is missing
  • Image Optimizer > dev support with next.config.js > should fail when q is missing
  • Image Optimizer > dev support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > dev support with next.config.js > should fail when q is less than 1
  • Image Optimizer > dev support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > dev support with next.config.js > should fail when w is not a number
  • Image Optimizer > dev support with next.config.js > should fail when q is not a number
  • Image Optimizer > dev support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > dev support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > dev support with next.config.js > should resize relative url and webp accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url and jpeg accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > dev support with next.config.js > should resize relative url and wildcard accept header as webp
  • Image Optimizer > dev support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > dev support with next.config.js > should fail when url has file protocol
  • Image Optimizer > dev support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > dev support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > dev support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > dev support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > dev support with next.config.js > should not resize if requested width is larger than original source image
Expand output

● Image Optimizer › config checks › should error when domains length exceeds 50

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:327:24)

● Image Optimizer › config checks › should error when sizes length exceeds 25

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:352:24)

● Image Optimizer › config checks › should error when deviceSizes contains invalid widths

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:377:24)

● Image Optimizer › config checks › should error when imageSizes contains invalid widths

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:402:24)

● Image Optimizer › dev support w/o next.config.js › should return home page

FetchError: request to http://localhost:37683/ failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated gif

FetchError: request to http://localhost:37683/_next/image?w=320&q=90&url=%2Fanimated.gif failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated png

FetchError: request to http://localhost:37683/_next/image?w=320&q=90&url=%2Fanimated.png failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated webp

FetchError: request to http://localhost:37683/_next/image?w=320&q=90&url=%2Fanimated.webp failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain vector svg

FetchError: request to http://localhost:37683/_next/image?w=320&q=90&url=%2Ftest.svg failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url is missing

FetchError: request to http://localhost:37683/_next/image?w=320&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is missing

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is missing

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=320 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is greater than 100

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=320&q=101 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is less than 1

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=320&q=0 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is 0 or less

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=0&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is not a number

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=foo&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is not a number

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=320&q=foo failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when domain is not defined in next.config.js

FetchError: request to http://localhost:37683/_next/image?url=http%3A%2F%2Fvercel.com%2Fbutton&w=320&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when width is not in next.config.js

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=1000&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and webp accept header

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and jpeg accept header

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and png accept header

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as png

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as gif

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.gif&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as tiff

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.tiff&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and wildcard accept header as webp

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url has file protocol

FetchError: request to http://localhost:37683/_next/image?url=file%3A%2F%2Flocalhost%3A37683%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url has ftp protocol

FetchError: request to http://localhost:37683/_next/image?url=ftp%3A%2F%2Flocalhost%3A37683%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should use cached image file when parameters are the same

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should proxy-pass unsupported image types and should not cache file

ENOENT: no such file or directory, scandir '/home/runner/work/next.js/next.js/test/integration/image-optimizer/.next/cache/images'

● Image Optimizer › dev support w/o next.config.js › should not resize if requested width is larger than original source image

FetchError: request to http://localhost:37683/_next/image?url=%2Ftest.jpg&w=1024&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:37683

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › dev support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:454:18

● Image Optimizer › Server support w/o next.config.js › should return home page

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated gif

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated png

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated webp

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain vector svg

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is greater than 100

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is less than 1

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is 0 or less

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is not a number

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is not a number

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when domain is not defined in next.config.js

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when width is not in next.config.js

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and webp accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and jpeg accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and png accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as png

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as gif

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as tiff

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and wildcard accept header as webp

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url has file protocol

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url has ftp protocol

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should use cached image file when parameters are the same

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should proxy-pass unsupported image types and should not cache file

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should not resize if requested width is larger than original source image

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Server support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:491:18

● Image Optimizer › Serverless support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and webp accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and jpeg accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and wildcard accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › Serverless support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:515:18

● Image Optimizer › dev support next.config.js cloudinary loader › should 404 when loader is not default

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:537:18

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:437:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:459:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:475:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:497:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:521:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:542:13

@ijjk
Copy link
Member

ijjk commented Nov 2, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
buildDuration 12.5s 12.7s ⚠️ +261ms
nodeModulesSize 90.1 MB 90.1 MB ⚠️ +719 B
Page Load Tests Overall increase ✓
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
/ failed reqs 0 0
/ total time (seconds) 2.312 2.338 ⚠️ +0.03
/ avg req/sec 1081.51 1069.23 ⚠️ -12.28
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.248 1.235 -0.01
/error-in-render avg req/sec 2002.7 2024.01 +21.31
Client Bundles (main, webpack, commons)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..3aa9.js gzip 11.3 kB 11.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-a9d3c03..afc6.js gzip 7.35 kB 7.35 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..dule.js gzip 7.03 kB 7.03 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-3914a19..dule.js gzip 6.35 kB 6.35 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-e71be6d..3531.js gzip 1.34 kB 1.34 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-6d15176..dule.js gzip 1.31 kB 1.31 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.41 kB 5.41 kB
Client Build Manifests
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
index.html gzip 1 kB 1 kB
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 996 B 996 B
Overall change 3.01 kB 3.01 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
buildDuration 14.1s 14.5s ⚠️ +391ms
nodeModulesSize 90.1 MB 90.1 MB ⚠️ +719 B
Client Bundles (main, webpack, commons)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..3aa9.js gzip 11.3 kB 11.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-a9d3c03..afc6.js gzip 7.35 kB 7.35 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
677f882d2ed8..dule.js gzip 7.03 kB 7.03 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-3914a19..dule.js gzip 6.35 kB 6.35 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-e71be6d..3531.js gzip 1.34 kB 1.34 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-6d15176..dule.js gzip 1.31 kB 1.31 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.41 kB 5.41 kB
Client Build Manifests
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary TylerShin/next.js feature/regex-image-domains Change
_error.js 1.06 MB 1.06 MB
404.html 4.73 kB 4.73 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.06 MB 1.06 MB
link.js 1.11 MB 1.11 MB
routerDirect.js 1.1 MB 1.1 MB
withRouter.js 1.1 MB 1.1 MB
Overall change 5.43 MB 5.43 MB
Commit: ff30890

@ijjk
Copy link
Member

ijjk commented Nov 2, 2020

Failing test suites

Commit: ff30890

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

  • Image Optimizer > Server support w/o next.config.js > should return home page
  • Image Optimizer > Server support w/o next.config.js > should maintain animated gif
  • Image Optimizer > Server support w/o next.config.js > should maintain animated png
  • Image Optimizer > Server support w/o next.config.js > should maintain animated webp
  • Image Optimizer > Server support w/o next.config.js > should maintain vector svg
  • Image Optimizer > Server support w/o next.config.js > should maintain jpg format for old Safari
  • Image Optimizer > Server support w/o next.config.js > should maintain png format for old Safari
  • Image Optimizer > Server support w/o next.config.js > should fail when url is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when w is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when q is missing
  • Image Optimizer > Server support w/o next.config.js > should fail when q is greater than 100
  • Image Optimizer > Server support w/o next.config.js > should fail when q is less than 1
  • Image Optimizer > Server support w/o next.config.js > should fail when w is 0 or less
  • Image Optimizer > Server support w/o next.config.js > should fail when w is not a number
  • Image Optimizer > Server support w/o next.config.js > should fail when q is not a number
  • Image Optimizer > Server support w/o next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Server support w/o next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and webp Firefox accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and png accept header
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Server support w/o next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Server support w/o next.config.js > should resize relative url and Chrome accept header as webp
  • Image Optimizer > Server support w/o next.config.js > should fail when url has file protocol
  • Image Optimizer > Server support w/o next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Server support w/o next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Server support w/o next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Server support w/o next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > Server support with next.config.js > should return home page
  • Image Optimizer > Server support with next.config.js > should maintain animated gif
  • Image Optimizer > Server support with next.config.js > should maintain animated png
  • Image Optimizer > Server support with next.config.js > should maintain animated webp
  • Image Optimizer > Server support with next.config.js > should maintain vector svg
  • Image Optimizer > Server support with next.config.js > should maintain jpg format for old Safari
  • Image Optimizer > Server support with next.config.js > should maintain png format for old Safari
  • Image Optimizer > Server support with next.config.js > should fail when url is missing
  • Image Optimizer > Server support with next.config.js > should fail when w is missing
  • Image Optimizer > Server support with next.config.js > should fail when q is missing
  • Image Optimizer > Server support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > Server support with next.config.js > should fail when q is less than 1
  • Image Optimizer > Server support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > Server support with next.config.js > should fail when w is not a number
  • Image Optimizer > Server support with next.config.js > should fail when q is not a number
  • Image Optimizer > Server support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Server support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Server support with next.config.js > should resize relative url and webp Firefox accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Server support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Server support with next.config.js > should resize relative url and Chrome accept header as webp
  • Image Optimizer > Server support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > Server support with next.config.js > should fail when url has file protocol
  • Image Optimizer > Server support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Server support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > Server support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Server support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Server support with next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > Serverless support with next.config.js > should return home page
  • Image Optimizer > Serverless support with next.config.js > should maintain animated gif
  • Image Optimizer > Serverless support with next.config.js > should maintain animated png
  • Image Optimizer > Serverless support with next.config.js > should maintain animated webp
  • Image Optimizer > Serverless support with next.config.js > should maintain vector svg
  • Image Optimizer > Serverless support with next.config.js > should maintain jpg format for old Safari
  • Image Optimizer > Serverless support with next.config.js > should maintain png format for old Safari
  • Image Optimizer > Serverless support with next.config.js > should fail when url is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when w is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when q is missing
  • Image Optimizer > Serverless support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > Serverless support with next.config.js > should fail when q is less than 1
  • Image Optimizer > Serverless support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > Serverless support with next.config.js > should fail when w is not a number
  • Image Optimizer > Serverless support with next.config.js > should fail when q is not a number
  • Image Optimizer > Serverless support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > Serverless support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and webp Firefox accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > Serverless support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > Serverless support with next.config.js > should resize relative url and Chrome accept header as webp
  • Image Optimizer > Serverless support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > Serverless support with next.config.js > should fail when url has file protocol
  • Image Optimizer > Serverless support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > Serverless support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > Serverless support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > Serverless support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > Serverless support with next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > config checks > should error when domains length exceeds 50
  • Image Optimizer > config checks > should error when sizes length exceeds 25
  • Image Optimizer > config checks > should error when deviceSizes contains invalid widths
  • Image Optimizer > config checks > should error when imageSizes contains invalid widths
  • Image Optimizer > dev support next.config.js cloudinary loader > should 404 when loader is not default
  • Image Optimizer > dev support w/o next.config.js > should return home page
  • Image Optimizer > dev support w/o next.config.js > should maintain animated gif
  • Image Optimizer > dev support w/o next.config.js > should maintain animated png
  • Image Optimizer > dev support w/o next.config.js > should maintain animated webp
  • Image Optimizer > dev support w/o next.config.js > should maintain vector svg
  • Image Optimizer > dev support w/o next.config.js > should maintain jpg format for old Safari
  • Image Optimizer > dev support w/o next.config.js > should maintain png format for old Safari
  • Image Optimizer > dev support w/o next.config.js > should fail when url is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when w is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when q is missing
  • Image Optimizer > dev support w/o next.config.js > should fail when q is greater than 100
  • Image Optimizer > dev support w/o next.config.js > should fail when q is less than 1
  • Image Optimizer > dev support w/o next.config.js > should fail when w is 0 or less
  • Image Optimizer > dev support w/o next.config.js > should fail when w is not a number
  • Image Optimizer > dev support w/o next.config.js > should fail when q is not a number
  • Image Optimizer > dev support w/o next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > dev support w/o next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and webp Firefox accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and png accept header
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > dev support w/o next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > dev support w/o next.config.js > should resize relative url and Chrome accept header as webp
  • Image Optimizer > dev support w/o next.config.js > should fail when url has file protocol
  • Image Optimizer > dev support w/o next.config.js > should fail when url has ftp protocol
  • Image Optimizer > dev support w/o next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > dev support w/o next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > dev support w/o next.config.js > should not resize if requested width is larger than original source image
  • Image Optimizer > dev support with next.config.js > should return home page
  • Image Optimizer > dev support with next.config.js > should maintain animated gif
  • Image Optimizer > dev support with next.config.js > should maintain animated png
  • Image Optimizer > dev support with next.config.js > should maintain animated webp
  • Image Optimizer > dev support with next.config.js > should maintain vector svg
  • Image Optimizer > dev support with next.config.js > should maintain jpg format for old Safari
  • Image Optimizer > dev support with next.config.js > should maintain png format for old Safari
  • Image Optimizer > dev support with next.config.js > should fail when url is missing
  • Image Optimizer > dev support with next.config.js > should fail when w is missing
  • Image Optimizer > dev support with next.config.js > should fail when q is missing
  • Image Optimizer > dev support with next.config.js > should fail when q is greater than 100
  • Image Optimizer > dev support with next.config.js > should fail when q is less than 1
  • Image Optimizer > dev support with next.config.js > should fail when w is 0 or less
  • Image Optimizer > dev support with next.config.js > should fail when w is not a number
  • Image Optimizer > dev support with next.config.js > should fail when q is not a number
  • Image Optimizer > dev support with next.config.js > should fail when domain is not defined in next.config.js
  • Image Optimizer > dev support with next.config.js > should fail when width is not in next.config.js
  • Image Optimizer > dev support with next.config.js > should resize relative url and webp Firefox accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url and png accept header
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as png
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as gif
  • Image Optimizer > dev support with next.config.js > should resize relative url with invalid accept header as tiff
  • Image Optimizer > dev support with next.config.js > should resize relative url and Chrome accept header as webp
  • Image Optimizer > dev support with next.config.js > should resize absolute url from localhost
  • Image Optimizer > dev support with next.config.js > should fail when url has file protocol
  • Image Optimizer > dev support with next.config.js > should fail when url has ftp protocol
  • Image Optimizer > dev support with next.config.js > should fail when url fails to load an image
  • Image Optimizer > dev support with next.config.js > should use cached image file when parameters are the same
  • Image Optimizer > dev support with next.config.js > should proxy-pass unsupported image types and should not cache file
  • Image Optimizer > dev support with next.config.js > should not resize if requested width is larger than original source image
Expand output

● Image Optimizer › config checks › should error when domains length exceeds 50

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:340:24)

● Image Optimizer › config checks › should error when sizes length exceeds 25

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:365:24)

● Image Optimizer › config checks › should error when deviceSizes contains invalid widths

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:390:24)

● Image Optimizer › config checks › should error when imageSizes contains invalid widths

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/image-optimizer/test/index.test.js:415:24)

● Image Optimizer › dev support w/o next.config.js › should return home page

FetchError: request to http://localhost:46395/ failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated gif

FetchError: request to http://localhost:46395/_next/image?w=320&q=90&url=%2Fanimated.gif failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated png

FetchError: request to http://localhost:46395/_next/image?w=320&q=90&url=%2Fanimated.png failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain animated webp

FetchError: request to http://localhost:46395/_next/image?w=320&q=90&url=%2Fanimated.webp failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain vector svg

FetchError: request to http://localhost:46395/_next/image?w=320&q=90&url=%2Ftest.svg failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain jpg format for old Safari

FetchError: request to http://localhost:46395/_next/image?w=320&q=90&url=%2Ftest.jpg failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should maintain png format for old Safari

FetchError: request to http://localhost:46395/_next/image?w=320&q=75&url=%2Ftest.png failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url is missing

FetchError: request to http://localhost:46395/_next/image?w=320&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is missing

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is missing

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=320 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is greater than 100

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=320&q=101 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is less than 1

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=320&q=0 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is 0 or less

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=0&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when w is not a number

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=foo&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when q is not a number

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=320&q=foo failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when domain is not defined in next.config.js

FetchError: request to http://localhost:46395/_next/image?url=http%3A%2F%2Fvercel.com%2Fbutton&w=320&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when width is not in next.config.js

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=1000&q=100 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and webp Firefox accept header

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and png accept header

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as png

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as gif

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.gif&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url with invalid accept header as tiff

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.tiff&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should resize relative url and Chrome accept header as webp

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url has file protocol

FetchError: request to http://localhost:46395/_next/image?url=file%3A%2F%2Flocalhost%3A46395%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should fail when url has ftp protocol

FetchError: request to http://localhost:46395/_next/image?url=ftp%3A%2F%2Flocalhost%3A46395%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should use cached image file when parameters are the same

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.png&w=320&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support w/o next.config.js › should proxy-pass unsupported image types and should not cache file

ENOENT: no such file or directory, scandir '/home/runner/work/next.js/next.js/test/integration/image-optimizer/.next/cache/images'

● Image Optimizer › dev support w/o next.config.js › should not resize if requested width is larger than original source image

FetchError: request to http://localhost:46395/_next/image?url=%2Ftest.jpg&w=1024&q=80 failed, reason: connect ECONNREFUSED 127.0.0.1:46395

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Image Optimizer › dev support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should maintain jpg format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should maintain png format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should resize relative url and webp Firefox accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should resize relative url and Chrome accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › dev support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:467:18

● Image Optimizer › Server support w/o next.config.js › should return home page

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated gif

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated png

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain animated webp

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain vector svg

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain jpg format for old Safari

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should maintain png format for old Safari

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is missing

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is greater than 100

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is less than 1

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is 0 or less

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when w is not a number

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when q is not a number

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when domain is not defined in next.config.js

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when width is not in next.config.js

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and webp Firefox accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and png accept header

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as png

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as gif

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url with invalid accept header as tiff

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should resize relative url and Chrome accept header as webp

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url has file protocol

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should fail when url has ftp protocol

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should use cached image file when parameters are the same

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should proxy-pass unsupported image types and should not cache file

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support w/o next.config.js › should not resize if requested width is larger than original source image

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Image Optimizer › Server support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should maintain jpg format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should maintain png format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should resize relative url and webp Firefox accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should resize relative url and Chrome accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Server support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:504:18

● Image Optimizer › Serverless support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should maintain vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should maintain jpg format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should maintain png format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is 0 or less

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when domain is not defined in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and webp Firefox accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url with invalid accept header as tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should resize relative url and Chrome accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should fail when url fails to load an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should use cached image file when parameters are the same

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should proxy-pass unsupported image types and should not cache file

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › Serverless support with next.config.js › should not resize if requested width is larger than original source image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:528:18

● Image Optimizer › dev support next.config.js cloudinary loader › should 404 when loader is not default

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {"images":{"deviceSizes":[1024],"imageSizes":[64],"domains":["localhost","example.com",{}]}}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at integration/image-optimizer/test/index.test.js:550:18

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:450:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:472:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:488:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:510:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:534:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/image-optimizer/test/index.test.js:555:13

@lachlanjc
Copy link
Contributor

Related: #18730

@timneutkens
Copy link
Member

Going to close this PR as it's stale and has a lot of failing tests.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants