Skip to content

Format JavaScript, TypeScript, and JSON with Biome #79251

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

Draft
wants to merge 2 commits into
base: canary
Choose a base branch
from

Conversation

wbinnssmith
Copy link
Member

@wbinnssmith wbinnssmith commented May 15, 2025

Please review the first commit in this PR for configuration changes.

This configures Biome to format all JavaScript and TypeScript code with a configuration that approximates our current prettier configuration.

There are some exceptions to minimize diff churn, each of which will be addressed in a followup PR. Prettier remains in place for these:

  • examples/
  • create-next-app template files
  • Non-js/ts

Some files parse correctly with prettier but do not with Biome. They’re often test cases like turbopack/crates/turbopack-tests/tests/snapshot/comptime/early-return/input/module.js, so these are left ignored.

Test Plan: pnpm prettier-check. Format was applied using pnpm prettier-fix.

Copy link

changeset-bot bot commented May 15, 2025

⚠️ No Changeset found

Latest commit: bd2cd68

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ijjk ijjk added the created-by: Turbopack team PRs by the Turbopack team. label May 15, 2025
@wbinnssmith wbinnssmith requested review from bgw and devjiwonchoi May 15, 2025 16:09
@wbinnssmith wbinnssmith force-pushed the wbinnssmith/biome-format branch from 3728e14 to 42c1c37 Compare May 15, 2025 16:12
devjiwonchoi
devjiwonchoi previously approved these changes May 15, 2025
Copy link
Member

@devjiwonchoi devjiwonchoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we apply to precommit hook? I think that's the most part we could benfit.

@devjiwonchoi
Copy link
Member

devjiwonchoi commented May 15, 2025

We might want to change .vscode/settings.json:

"[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },

to biome.biome

@ijjk
Copy link
Member

ijjk commented May 15, 2025

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js wbinnssmith/biome-format Change
buildDuration 29.3s 29.9s ⚠️ +592ms
buildDurationCached 27s 26.7s N/A
nodeModulesSize 424 MB 424 MB ⚠️ +12.4 kB
nextStartRea..uration (ms) 813ms 863ms N/A
Client Bundles (main, webpack) Overall increase ⚠️
vercel/next.js canary vercel/next.js wbinnssmith/biome-format Change
1733-HASH.js gzip 44.5 kB 45 kB ⚠️ +473 B
194b18f3-HASH.js gzip 53.8 kB 53.8 kB N/A
2192.HASH.js gzip 169 B 169 B
4719-HASH.js gzip 5.47 kB 5.44 kB N/A
framework-HASH.js gzip 57.4 kB 57.4 kB
main-app-HASH.js gzip 254 B 256 B N/A
main-HASH.js gzip 33.5 kB 33.6 kB N/A
webpack-HASH.js gzip 1.71 kB 1.71 kB N/A
Overall change 102 kB 103 kB ⚠️ +473 B
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js wbinnssmith/biome-format Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Overall change 39.4 kB 39.4 kB
Client Pages
vercel/next.js canary vercel/next.js wbinnssmith/biome-format Change
_app-HASH.js gzip 193 B 193 B
_error-HASH.js gzip 192 B 192 B
amp-HASH.js gzip 510 B 510 B
css-HASH.js gzip 344 B 342 B N/A
dynamic-HASH.js gzip 1.84 kB 1.83 kB N/A
edge-ssr-HASH.js gzip 265 B 265 B
head-HASH.js gzip 363 B 364 B N/A
hooks-HASH.js gzip 392 B 391 B N/A
image-HASH.js gzip 4.69 kB 4.67 kB N/A
index-HASH.js gzip 267 B 267 B
link-HASH.js gzip 2.53 kB 2.53 kB N/A
routerDirect..HASH.js gzip 328 B 325 B N/A
script-HASH.js gzip 396 B 396 B
withRouter-HASH.js gzip 325 B 325 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 2.25 kB 2.25 kB
Client Build Manifests
vercel/next.js canary vercel/next.js wbinnssmith/biome-format Change
_buildManifest.js gzip 751 B 750 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js wbinnssmith/biome-format Change
index.html gzip 524 B 524 B
link.html gzip 538 B 538 B
withRouter.html gzip 520 B 520 B
Overall change 1.58 kB 1.58 kB
Edge SSR bundle Size
vercel/next.js canary vercel/next.js wbinnssmith/biome-format Change
edge-ssr.js gzip 137 kB 137 kB N/A
page.js gzip 219 kB 213 kB N/A
Overall change 0 B 0 B
Middleware size Overall increase ⚠️
vercel/next.js canary vercel/next.js wbinnssmith/biome-format Change
middleware-b..fest.js gzip 675 B 676 B N/A
middleware-r..fest.js gzip 155 B 157 B N/A
middleware.js gzip 32.4 kB 32.7 kB ⚠️ +245 B
edge-runtime..pack.js gzip 853 B 853 B
Overall change 33.3 kB 33.5 kB ⚠️ +245 B
Next Runtimes
vercel/next.js canary vercel/next.js wbinnssmith/biome-format Change
app-page-exp...dev.js gzip 320 kB 320 kB
app-page-exp..prod.js gzip 149 kB 149 kB
app-page-tur...dev.js gzip 320 kB 320 kB N/A
app-page-tur..prod.js gzip 149 kB 149 kB
app-page-tur...dev.js gzip 312 kB 312 kB N/A
app-page-tur..prod.js gzip 145 kB 145 kB
app-page.run...dev.js gzip 312 kB 312 kB
app-page.run..prod.js gzip 145 kB 145 kB
app-route-ex...dev.js gzip 51.5 kB 51.5 kB
app-route-ex..prod.js gzip 33.8 kB 33.8 kB
app-route-tu...dev.js gzip 51.5 kB 51.5 kB
app-route-tu..prod.js gzip 33.8 kB 33.8 kB
app-route-tu...dev.js gzip 50.8 kB 50.8 kB
app-route-tu..prod.js gzip 33.4 kB 33.4 kB
app-route.ru...dev.js gzip 50.8 kB 50.8 kB
app-route.ru..prod.js gzip 33.4 kB 33.4 kB
dist_client_...dev.js gzip 326 B 326 B
dist_client_...dev.js gzip 328 B 328 B
dist_client_...dev.js gzip 320 B 320 B
dist_client_...dev.js gzip 318 B 318 B
pages-api-tu...dev.js gzip 22.4 kB 22.4 kB
pages-api-tu..prod.js gzip 16.6 kB 16.6 kB
pages-api.ru...dev.js gzip 22.4 kB 22.4 kB
pages-api.ru..prod.js gzip 16.6 kB 16.6 kB
pages-turbo....dev.js gzip 39.1 kB 39.1 kB
pages-turbo...prod.js gzip 27.9 kB 27.9 kB
pages.runtim...dev.js gzip 39.3 kB 39.3 kB N/A
pages.runtim..prod.js gzip 28.1 kB 28.1 kB
server.runti..prod.js gzip 63.2 kB 63.2 kB
Overall change 1.8 MB 1.8 MB
build cache
vercel/next.js canary vercel/next.js wbinnssmith/biome-format Change
0.pack gzip 2.2 MB 2.2 MB N/A
index.pack gzip 78.1 kB 77.1 kB N/A
Overall change 0 B 0 B
Diff details
Diff for page.js

Diff too large to display

Diff for middleware.js

Diff too large to display

Diff for edge-ssr.js
failed to diff
Diff for css-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [9813],
   {
-    /***/ 1586: /***/ (
+    /***/ 2628: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/css",
         function () {
-          return __webpack_require__(4362);
+          return __webpack_require__(8707);
         },
       ]);
       if (false) {
@@ -18,14 +18,7 @@
       /***/
     },
 
-    /***/ 4350: /***/ (module) => {
-      // extracted by mini-css-extract-plugin
-      module.exports = { helloWorld: "css_helloWorld__aUdUq" };
-
-      /***/
-    },
-
-    /***/ 4362: /***/ (
+    /***/ 8707: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -39,7 +32,7 @@
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(5640);
       /* harmony import */ var _css_module_css__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(4350);
+        __webpack_require__(9080);
       /* harmony import */ var _css_module_css__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           _css_module_css__WEBPACK_IMPORTED_MODULE_1__
@@ -58,13 +51,20 @@
 
       /***/
     },
+
+    /***/ 9080: /***/ (module) => {
+      // extracted by mini-css-extract-plugin
+      module.exports = { helloWorld: "css_helloWorld__aUdUq" };
+
+      /***/
+    },
   },
   /******/ (__webpack_require__) => {
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [636, 6593, 8792], () =>
-      __webpack_exec__(1586)
+      __webpack_exec__(2628)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for dynamic-HASH.js
@@ -1,17 +1,117 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [2291],
   {
-    /***/ 283: /***/ (
+    /***/ 2001: /***/ (
+      __unused_webpack_module,
+      __webpack_exports__,
+      __webpack_require__
+    ) => {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+      /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+        /* harmony export */ __N_SSP: () => /* binding */ __N_SSP,
+        /* harmony export */ default: () => __WEBPACK_DEFAULT_EXPORT__,
+        /* harmony export */
+      });
+      /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
+        __webpack_require__(5640);
+      /* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1__ =
+        __webpack_require__(9553);
+      /* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1___default =
+        /*#__PURE__*/ __webpack_require__.n(
+          next_dynamic__WEBPACK_IMPORTED_MODULE_1__
+        );
+
+      const DynamicHello = next_dynamic__WEBPACK_IMPORTED_MODULE_1___default()(
+        () =>
+          __webpack_require__
+            .e(/* import() */ 8042)
+            .then(__webpack_require__.bind(__webpack_require__, 8042))
+            .then((mod) => mod.Hello),
+        {
+          loadableGenerated: {
+            webpack: () => [/*require.resolve*/ 8042],
+          },
+        }
+      );
+      const Page = () =>
+        /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(
+          react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,
+          {
+            children: [
+              /*#__PURE__*/ (0,
+              react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
+                children: "testing next/dynamic size",
+              }),
+              /*#__PURE__*/ (0,
+              react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
+                DynamicHello,
+                {}
+              ),
+            ],
+          }
+        );
+      var __N_SSP = true;
+      /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = Page;
+
+      /***/
+    },
+
+    /***/ 2976: /***/ (
+      __unused_webpack_module,
+      __unused_webpack_exports,
+      __webpack_require__
+    ) => {
+      (window.__NEXT_P = window.__NEXT_P || []).push([
+        "/dynamic",
+        function () {
+          return __webpack_require__(2001);
+        },
+      ]);
+      if (false) {
+      }
+
+      /***/
+    },
+
+    /***/ 7807: /***/ (
+      __unused_webpack_module,
+      exports,
+      __webpack_require__
+    ) => {
+      "use strict";
+      /* __next_internal_client_entry_do_not_use__  cjs */
+      Object.defineProperty(exports, "__esModule", {
+        value: true,
+      });
+      Object.defineProperty(exports, "LoadableContext", {
+        enumerable: true,
+        get: function () {
+          return LoadableContext;
+        },
+      });
+      const _interop_require_default = __webpack_require__(1532);
+      const _react = /*#__PURE__*/ _interop_require_default._(
+        __webpack_require__(148)
+      );
+      const LoadableContext = _react.default.createContext(null);
+      if (false) {
+      } //# sourceMappingURL=loadable-context.shared-runtime.js.map
+
+      /***/
+    },
+
+    /***/ 9553: /***/ (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      module.exports = __webpack_require__(6990);
+      module.exports = __webpack_require__(9986);
 
       /***/
     },
 
-    /***/ 505: /***/ (
+    /***/ 9829: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -53,7 +153,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
       const _react = /*#__PURE__*/ _interop_require_default._(
         __webpack_require__(148)
       );
-      const _loadablecontextsharedruntime = __webpack_require__(6179);
+      const _loadablecontextsharedruntime = __webpack_require__(7807);
       function resolve(obj) {
         return obj && obj.default ? obj.default : obj;
       }
@@ -288,90 +388,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
       /***/
     },
 
-    /***/ 5703: /***/ (
-      __unused_webpack_module,
-      __webpack_exports__,
-      __webpack_require__
-    ) => {
-      "use strict";
-      __webpack_require__.r(__webpack_exports__);
-      /* harmony export */ __webpack_require__.d(__webpack_exports__, {
-        /* harmony export */ __N_SSP: () => /* binding */ __N_SSP,
-        /* harmony export */ default: () => __WEBPACK_DEFAULT_EXPORT__,
-        /* harmony export */
-      });
-      /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
-        __webpack_require__(5640);
-      /* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(283);
-      /* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1___default =
-        /*#__PURE__*/ __webpack_require__.n(
-          next_dynamic__WEBPACK_IMPORTED_MODULE_1__
-        );
-
-      const DynamicHello = next_dynamic__WEBPACK_IMPORTED_MODULE_1___default()(
-        () =>
-          __webpack_require__
-            .e(/* import() */ 2192)
-            .then(__webpack_require__.bind(__webpack_require__, 2192))
-            .then((mod) => mod.Hello),
-        {
-          loadableGenerated: {
-            webpack: () => [/*require.resolve*/ 2192],
-          },
-        }
-      );
-      const Page = () =>
-        /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(
-          react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,
-          {
-            children: [
-              /*#__PURE__*/ (0,
-              react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
-                children: "testing next/dynamic size",
-              }),
-              /*#__PURE__*/ (0,
-              react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
-                DynamicHello,
-                {}
-              ),
-            ],
-          }
-        );
-      var __N_SSP = true;
-      /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = Page;
-
-      /***/
-    },
-
-    /***/ 6179: /***/ (
-      __unused_webpack_module,
-      exports,
-      __webpack_require__
-    ) => {
-      "use strict";
-      /* __next_internal_client_entry_do_not_use__  cjs */
-      Object.defineProperty(exports, "__esModule", {
-        value: true,
-      });
-      Object.defineProperty(exports, "LoadableContext", {
-        enumerable: true,
-        get: function () {
-          return LoadableContext;
-        },
-      });
-      const _interop_require_default = __webpack_require__(1532);
-      const _react = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(148)
-      );
-      const LoadableContext = _react.default.createContext(null);
-      if (false) {
-      } //# sourceMappingURL=loadable-context.shared-runtime.js.map
-
-      /***/
-    },
-
-    /***/ 6990: /***/ (module, exports, __webpack_require__) => {
+    /***/ 9986: /***/ (module, exports, __webpack_require__) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -404,7 +421,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
         __webpack_require__(148)
       );
       const _loadablesharedruntime = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(505)
+        __webpack_require__(9829)
       );
       const isServerSide = "object" === "undefined";
       // Normalize loader to return the module as form { default: Component } for `React.lazy`.
@@ -504,30 +521,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
 
       /***/
     },
-
-    /***/ 9254: /***/ (
-      __unused_webpack_module,
-      __unused_webpack_exports,
-      __webpack_require__
-    ) => {
-      (window.__NEXT_P = window.__NEXT_P || []).push([
-        "/dynamic",
-        function () {
-          return __webpack_require__(5703);
-        },
-      ]);
-      if (false) {
-      }
-
-      /***/
-    },
   },
   /******/ (__webpack_require__) => {
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [636, 6593, 8792], () =>
-      __webpack_exec__(9254)
+      __webpack_exec__(2976)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for hooks-HASH.js
@@ -1,24 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [9804],
   {
-    /***/ 1664: /***/ (
-      __unused_webpack_module,
-      __unused_webpack_exports,
-      __webpack_require__
-    ) => {
-      (window.__NEXT_P = window.__NEXT_P || []).push([
-        "/hooks",
-        function () {
-          return __webpack_require__(6130);
-        },
-      ]);
-      if (false) {
-      }
-
-      /***/
-    },
-
-    /***/ 6130: /***/ (
+    /***/ 4756: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -76,13 +59,30 @@
 
       /***/
     },
+
+    /***/ 5426: /***/ (
+      __unused_webpack_module,
+      __unused_webpack_exports,
+      __webpack_require__
+    ) => {
+      (window.__NEXT_P = window.__NEXT_P || []).push([
+        "/hooks",
+        function () {
+          return __webpack_require__(4756);
+        },
+      ]);
+      if (false) {
+      }
+
+      /***/
+    },
   },
   /******/ (__webpack_require__) => {
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [636, 6593, 8792], () =>
-      __webpack_exec__(1664)
+      __webpack_exec__(5426)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for image-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [2983],
   {
-    /***/ 2198: /***/ (
+    /***/ 264: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/image",
         function () {
-          return __webpack_require__(3444);
+          return __webpack_require__(3594);
         },
       ]);
       if (false) {
@@ -18,7 +18,190 @@
       /***/
     },
 
-    /***/ 2514: /***/ (
+    /***/ 1206: /***/ (__unused_webpack_module, exports) => {
+      "use strict";
+
+      Object.defineProperty(exports, "__esModule", {
+        value: true,
+      });
+      Object.defineProperty(exports, "default", {
+        enumerable: true,
+        get: function () {
+          return _default;
+        },
+      });
+      const DEFAULT_Q = 75;
+      function defaultLoader(param) {
+        let { config, src, width, quality } = param;
+        var _config_qualities;
+        if (false) {
+        }
+        const q =
+          quality ||
+          ((_config_qualities = config.qualities) == null
+            ? void 0
+            : _config_qualities.reduce((prev, cur) =>
+                Math.abs(cur - DEFAULT_Q) < Math.abs(prev - DEFAULT_Q)
+                  ? cur
+                  : prev
+              )) ||
+          DEFAULT_Q;
+        return (
+          config.path +
+          "?url=" +
+          encodeURIComponent(src) +
+          "&w=" +
+          width +
+          "&q=" +
+          q +
+          (src.startsWith("/_next/static/media/") && false ? 0 : "")
+        );
+      }
+      // We use this to determine if the import is the default loader
+      // or a custom loader defined by the user in next.config.js
+      defaultLoader.__next_img_default = true;
+      const _default = defaultLoader; //# sourceMappingURL=image-loader.js.map
+
+      /***/
+    },
+
+    /***/ 1765: /***/ (module, exports, __webpack_require__) => {
+      "use strict";
+
+      Object.defineProperty(exports, "__esModule", {
+        value: true,
+      });
+      Object.defineProperty(exports, "useMergedRef", {
+        enumerable: true,
+        get: function () {
+          return useMergedRef;
+        },
+      });
+      const _react = __webpack_require__(148);
+      function useMergedRef(refA, refB) {
+        const cleanupA = (0, _react.useRef)(null);
+        const cleanupB = (0, _react.useRef)(null);
+        // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.
+        // (this happens often if the user doesn't pass a ref to Link/Form/Image)
+        // But this can cause us to leak a cleanup-ref into user code (e.g. via `<Link legacyBehavior>`),
+        // and the user might pass that ref into ref-merging library that doesn't support cleanup refs
+        // (because it hasn't been updated for React 19)
+        // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.
+        // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.
+        return (0, _react.useCallback)(
+          (current) => {
+            if (current === null) {
+              const cleanupFnA = cleanupA.current;
+              if (cleanupFnA) {
+                cleanupA.current = null;
+                cleanupFnA();
+              }
+              const cleanupFnB = cleanupB.current;
+              if (cleanupFnB) {
+                cleanupB.current = null;
+                cleanupFnB();
+              }
+            } else {
+              if (refA) {
+                cleanupA.current = applyRef(refA, current);
+              }
+              if (refB) {
+                cleanupB.current = applyRef(refB, current);
+              }
+            }
+          },
+          [refA, refB]
+        );
+      }
+      function applyRef(refA, current) {
+        if (typeof refA === "function") {
+          const cleanup = refA(current);
+          if (typeof cleanup === "function") {
+            return cleanup;
+          } else {
+            return () => refA(null);
+          }
+        } else {
+          refA.current = current;
+          return () => {
+            refA.current = null;
+          };
+        }
+      }
+      if (
+        (typeof exports.default === "function" ||
+          (typeof exports.default === "object" && exports.default !== null)) &&
+        typeof exports.default.__esModule === "undefined"
+      ) {
+        Object.defineProperty(exports.default, "__esModule", {
+          value: true,
+        });
+        Object.assign(exports.default, exports);
+        module.exports = exports.default;
+      } //# sourceMappingURL=use-merged-ref.js.map
+
+      /***/
+    },
+
+    /***/ 3353: /***/ (
+      module,
+      __unused_webpack_exports,
+      __webpack_require__
+    ) => {
+      module.exports = __webpack_require__(5526);
+
+      /***/
+    },
+
+    /***/ 3594: /***/ (
+      __unused_webpack_module,
+      __webpack_exports__,
+      __webpack_require__
+    ) => {
+      "use strict";
+      // ESM COMPAT FLAG
+      __webpack_require__.r(__webpack_exports__);
+
+      // EXPORTS
+      __webpack_require__.d(__webpack_exports__, {
+        __N_SSP: () => /* binding */ __N_SSP,
+        default: () => /* binding */ pages_image,
+      });
+
+      // EXTERNAL MODULE: ./node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.js
+      var jsx_runtime = __webpack_require__(5640);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/image.js
+      var next_image = __webpack_require__(3353);
+      var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // ./pages/nextjs.png
+      /* harmony default export */ const nextjs = {
+        src: "/_next/static/media/nextjs.cae0b805.png",
+        height: 1347,
+        width: 1626,
+        blurDataURL:
+          "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAAD1BMVEX////x8fH6+vrb29vo6Oh8o70bAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAH0lEQVR4nGNgwARMjIyMjCAGCzMzMwsTRISJCcRABwAEcAAkLCQfgAAAAABJRU5ErkJggg==",
+        blurWidth: 8,
+        blurHeight: 7,
+      }; // ./pages/image.js
+      function ImagePage(props) {
+        return /*#__PURE__*/ (0, jsx_runtime.jsxs)(jsx_runtime.Fragment, {
+          children: [
+            /*#__PURE__*/ (0, jsx_runtime.jsx)("h1", {
+              children: "next/image example",
+            }),
+            /*#__PURE__*/ (0, jsx_runtime.jsx)(image_default(), {
+              src: nextjs,
+              placeholder: "blur",
+            }),
+          ],
+        });
+      }
+      var __N_SSP = true;
+      /* harmony default export */ const pages_image = ImagePage;
+
+      /***/
+    },
+
+    /***/ 3854: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -34,9 +217,9 @@
           return getImgProps;
         },
       });
-      const _warnonce = __webpack_require__(5127);
-      const _imageblursvg = __webpack_require__(4287);
-      const _imageconfig = __webpack_require__(2795);
+      const _warnonce = __webpack_require__(3603);
+      const _imageblursvg = __webpack_require__(7835);
+      const _imageconfig = __webpack_require__(6799);
       const VALID_LOADING_VALUES =
         /* unused pure expression or super */ null && [
           "lazy",
@@ -463,55 +646,69 @@
       /***/
     },
 
-    /***/ 3444: /***/ (
+    /***/ 5526: /***/ (
       __unused_webpack_module,
-      __webpack_exports__,
+      exports,
       __webpack_require__
     ) => {
       "use strict";
-      // ESM COMPAT FLAG
-      __webpack_require__.r(__webpack_exports__);
 
-      // EXPORTS
-      __webpack_require__.d(__webpack_exports__, {
-        __N_SSP: () => /* binding */ __N_SSP,
-        default: () => /* binding */ pages_image,
+      Object.defineProperty(exports, "__esModule", {
+        value: true,
       });
-
-      // EXTERNAL MODULE: ./node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.js
-      var jsx_runtime = __webpack_require__(5640);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/image.js
-      var next_image = __webpack_require__(6359);
-      var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // ./pages/nextjs.png
-      /* harmony default export */ const nextjs = {
-        src: "/_next/static/media/nextjs.cae0b805.png",
-        height: 1347,
-        width: 1626,
-        blurDataURL:
-          "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAAD1BMVEX////x8fH6+vrb29vo6Oh8o70bAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAH0lEQVR4nGNgwARMjIyMjCAGCzMzMwsTRISJCcRABwAEcAAkLCQfgAAAAABJRU5ErkJggg==",
-        blurWidth: 8,
-        blurHeight: 7,
-      }; // ./pages/image.js
-      function ImagePage(props) {
-        return /*#__PURE__*/ (0, jsx_runtime.jsxs)(jsx_runtime.Fragment, {
-          children: [
-            /*#__PURE__*/ (0, jsx_runtime.jsx)("h1", {
-              children: "next/image example",
-            }),
-            /*#__PURE__*/ (0, jsx_runtime.jsx)(image_default(), {
-              src: nextjs,
-              placeholder: "blur",
-            }),
-          ],
+      0 && 0;
+      function _export(target, all) {
+        for (var name in all)
+          Object.defineProperty(target, name, {
+            enumerable: true,
+            get: all[name],
+          });
+      }
+      _export(exports, {
+        default: function () {
+          return _default;
+        },
+        getImageProps: function () {
+          return getImageProps;
+        },
+      });
+      const _interop_require_default = __webpack_require__(1532);
+      const _getimgprops = __webpack_require__(3854);
+      const _imagecomponent = __webpack_require__(8350);
+      const _imageloader = /*#__PURE__*/ _interop_require_default._(
+        __webpack_require__(1206)
+      );
+      function getImageProps(imgProps) {
+        const { props } = (0, _getimgprops.getImgProps)(imgProps, {
+          defaultLoader: _imageloader.default,
+          // This is replaced by webpack define plugin
+          imgConf: {
+            deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
+            imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
+            path: "/_next/image",
+            loader: "default",
+            dangerouslyAllowSVG: false,
+            unoptimized: false,
+          },
         });
+        // Normally we don't care about undefined props because we pass to JSX,
+        // but this exported function could be used by the end user for anything
+        // so we delete undefined props to clean it up a little.
+        for (const [key, value] of Object.entries(props)) {
+          if (value === undefined) {
+            delete props[key];
+          }
+        }
+        return {
+          props,
+        };
       }
-      var __N_SSP = true;
-      /* harmony default export */ const pages_image = ImagePage;
+      const _default = _imagecomponent.Image; //# sourceMappingURL=image-external.js.map
 
       /***/
     },
 
-    /***/ 4287: /***/ (__unused_webpack_module, exports) => {
+    /***/ 7835: /***/ (__unused_webpack_module, exports) => {
       "use strict";
       /**
        * A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -566,85 +763,7 @@
       /***/
     },
 
-    /***/ 4985: /***/ (module, exports, __webpack_require__) => {
-      "use strict";
-
-      Object.defineProperty(exports, "__esModule", {
-        value: true,
-      });
-      Object.defineProperty(exports, "useMergedRef", {
-        enumerable: true,
-        get: function () {
-          return useMergedRef;
-        },
-      });
-      const _react = __webpack_require__(148);
-      function useMergedRef(refA, refB) {
-        const cleanupA = (0, _react.useRef)(null);
-        const cleanupB = (0, _react.useRef)(null);
-        // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.
-        // (this happens often if the user doesn't pass a ref to Link/Form/Image)
-        // But this can cause us to leak a cleanup-ref into user code (e.g. via `<Link legacyBehavior>`),
-        // and the user might pass that ref into ref-merging library that doesn't support cleanup refs
-        // (because it hasn't been updated for React 19)
-        // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.
-        // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.
-        return (0, _react.useCallback)(
-          (current) => {
-            if (current === null) {
-              const cleanupFnA = cleanupA.current;
-              if (cleanupFnA) {
-                cleanupA.current = null;
-                cleanupFnA();
-              }
-              const cleanupFnB = cleanupB.current;
-              if (cleanupFnB) {
-                cleanupB.current = null;
-                cleanupFnB();
-              }
-            } else {
-              if (refA) {
-                cleanupA.current = applyRef(refA, current);
-              }
-              if (refB) {
-                cleanupB.current = applyRef(refB, current);
-              }
-            }
-          },
-          [refA, refB]
-        );
-      }
-      function applyRef(refA, current) {
-        if (typeof refA === "function") {
-          const cleanup = refA(current);
-          if (typeof cleanup === "function") {
-            return cleanup;
-          } else {
-            return () => refA(null);
-          }
-        } else {
-          refA.current = current;
-          return () => {
-            refA.current = null;
-          };
-        }
-      }
-      if (
-        (typeof exports.default === "function" ||
-          (typeof exports.default === "object" && exports.default !== null)) &&
-        typeof exports.default.__esModule === "undefined"
-      ) {
-        Object.defineProperty(exports.default, "__esModule", {
-          value: true,
-        });
-        Object.assign(exports.default, exports);
-        module.exports = exports.default;
-      } //# sourceMappingURL=use-merged-ref.js.map
-
-      /***/
-    },
-
-    /***/ 5898: /***/ (module, exports, __webpack_require__) => {
+    /***/ 8350: /***/ (module, exports, __webpack_require__) => {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -666,17 +785,17 @@
         __webpack_require__(7897)
       );
       const _head = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(5207)
+        __webpack_require__(8843)
       );
-      const _getimgprops = __webpack_require__(2514);
-      const _imageconfig = __webpack_require__(2795);
-      const _imageconfigcontextsharedruntime = __webpack_require__(2349);
-      const _warnonce = __webpack_require__(5127);
-      const _routercontextsharedruntime = __webpack_require__(3556);
+      const _getimgprops = __webpack_require__(3854);
+      const _imageconfig = __webpack_require__(6799);
+      const _imageconfigcontextsharedruntime = __webpack_require__(3905);
+      const _warnonce = __webpack_require__(3603);
+      const _routercontextsharedruntime = __webpack_require__(6712);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(5970)
+        __webpack_require__(1206)
       );
-      const _usemergedref = __webpack_require__(4985);
+      const _usemergedref = __webpack_require__(1765);
       // This is replaced by webpack define plugin
       const configEnv = {
         deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -1002,132 +1121,13 @@
 
       /***/
     },
-
-    /***/ 5970: /***/ (__unused_webpack_module, exports) => {
-      "use strict";
-
-      Object.defineProperty(exports, "__esModule", {
-        value: true,
-      });
-      Object.defineProperty(exports, "default", {
-        enumerable: true,
-        get: function () {
-          return _default;
-        },
-      });
-      const DEFAULT_Q = 75;
-      function defaultLoader(param) {
-        let { config, src, width, quality } = param;
-        var _config_qualities;
-        if (false) {
-        }
-        const q =
-          quality ||
-          ((_config_qualities = config.qualities) == null
-            ? void 0
-            : _config_qualities.reduce((prev, cur) =>
-                Math.abs(cur - DEFAULT_Q) < Math.abs(prev - DEFAULT_Q)
-                  ? cur
-                  : prev
-              )) ||
-          DEFAULT_Q;
-        return (
-          config.path +
-          "?url=" +
-          encodeURIComponent(src) +
-          "&w=" +
-          width +
-          "&q=" +
-          q +
-          (src.startsWith("/_next/static/media/") && false ? 0 : "")
-        );
-      }
-      // We use this to determine if the import is the default loader
-      // or a custom loader defined by the user in next.config.js
-      defaultLoader.__next_img_default = true;
-      const _default = defaultLoader; //# sourceMappingURL=image-loader.js.map
-
-      /***/
-    },
-
-    /***/ 6359: /***/ (
-      module,
-      __unused_webpack_exports,
-      __webpack_require__
-    ) => {
-      module.exports = __webpack_require__(8986);
-
-      /***/
-    },
-
-    /***/ 8986: /***/ (
-      __unused_webpack_module,
-      exports,
-      __webpack_require__
-    ) => {
-      "use strict";
-
-      Object.defineProperty(exports, "__esModule", {
-        value: true,
-      });
-      0 && 0;
-      function _export(target, all) {
-        for (var name in all)
-          Object.defineProperty(target, name, {
-            enumerable: true,
-            get: all[name],
-          });
-      }
-      _export(exports, {
-        default: function () {
-          return _default;
-        },
-        getImageProps: function () {
-          return getImageProps;
-        },
-      });
-      const _interop_require_default = __webpack_require__(1532);
-      const _getimgprops = __webpack_require__(2514);
-      const _imagecomponent = __webpack_require__(5898);
-      const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(5970)
-      );
-      function getImageProps(imgProps) {
-        const { props } = (0, _getimgprops.getImgProps)(imgProps, {
-          defaultLoader: _imageloader.default,
-          // This is replaced by webpack define plugin
-          imgConf: {
-            deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
-            imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
-            path: "/_next/image",
-            loader: "default",
-            dangerouslyAllowSVG: false,
-            unoptimized: false,
-          },
-        });
-        // Normally we don't care about undefined props because we pass to JSX,
-        // but this exported function could be used by the end user for anything
-        // so we delete undefined props to clean it up a little.
-        for (const [key, value] of Object.entries(props)) {
-          if (value === undefined) {
-            delete props[key];
-          }
-        }
-        return {
-          props,
-        };
-      }
-      const _default = _imagecomponent.Image; //# sourceMappingURL=image-external.js.map
-
-      /***/
-    },
   },
   /******/ (__webpack_require__) => {
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [636, 6593, 8792], () =>
-      __webpack_exec__(2198)
+      __webpack_exec__(264)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for index-HASH.js
@@ -1,7 +1,24 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [3332],
   {
-    /***/ 9418: /***/ (
+    /***/ 8230: /***/ (
+      __unused_webpack_module,
+      __unused_webpack_exports,
+      __webpack_require__
+    ) => {
+      (window.__NEXT_P = window.__NEXT_P || []).push([
+        "/",
+        function () {
+          return __webpack_require__(8696);
+        },
+      ]);
+      if (false) {
+      }
+
+      /***/
+    },
+
+    /***/ 8696: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -19,30 +36,13 @@
 
       /***/
     },
-
-    /***/ 9532: /***/ (
-      __unused_webpack_module,
-      __unused_webpack_exports,
-      __webpack_require__
-    ) => {
-      (window.__NEXT_P = window.__NEXT_P || []).push([
-        "/",
-        function () {
-          return __webpack_require__(9418);
-        },
-      ]);
-      if (false) {
-      }
-
-      /***/
-    },
   },
   /******/ (__webpack_require__) => {
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [636, 6593, 8792], () =>
-      __webpack_exec__(9532)
+      __webpack_exec__(8230)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for link-HASH.js
@@ -1,125 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [4672],
   {
-    /***/ 1854: /***/ (
-      __unused_webpack_module,
-      __webpack_exports__,
-      __webpack_require__
-    ) => {
-      "use strict";
-      __webpack_require__.r(__webpack_exports__);
-      /* harmony export */ __webpack_require__.d(__webpack_exports__, {
-        /* harmony export */ __N_SSP: () => /* binding */ __N_SSP,
-        /* harmony export */ default: () => __WEBPACK_DEFAULT_EXPORT__,
-        /* harmony export */
-      });
-      /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
-        __webpack_require__(5640);
-      /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(8770);
-      /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default =
-        /*#__PURE__*/ __webpack_require__.n(
-          next_link__WEBPACK_IMPORTED_MODULE_1__
-        );
-
-      function aLink(props) {
-        return /*#__PURE__*/ (0,
-        react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
-          children: [
-            /*#__PURE__*/ (0,
-            react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3", {
-              children: "A Link page!",
-            }),
-            /*#__PURE__*/ (0,
-            react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
-              next_link__WEBPACK_IMPORTED_MODULE_1___default(),
-              {
-                href: "/",
-                children: "Go to /",
-              }
-            ),
-          ],
-        });
-      }
-      var __N_SSP = true;
-      /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = aLink;
-
-      /***/
-    },
-
-    /***/ 3199: /***/ (__unused_webpack_module, exports) => {
-      "use strict";
-
-      Object.defineProperty(exports, "__esModule", {
-        value: true,
-      });
-      Object.defineProperty(exports, "errorOnce", {
-        enumerable: true,
-        get: function () {
-          return errorOnce;
-        },
-      });
-      let errorOnce = (_) => {};
-      if (false) {
-      } //# sourceMappingURL=error-once.js.map
-
-      /***/
-    },
-
-    /***/ 3568: /***/ (
-      __unused_webpack_module,
-      __unused_webpack_exports,
-      __webpack_require__
-    ) => {
-      (window.__NEXT_P = window.__NEXT_P || []).push([
-        "/link",
-        function () {
-          return __webpack_require__(1854);
-        },
-      ]);
-      if (false) {
-      }
-
-      /***/
-    },
-
-    /***/ 3857: /***/ (module, exports, __webpack_require__) => {
-      "use strict";
-
-      Object.defineProperty(exports, "__esModule", {
-        value: true,
-      });
-      Object.defineProperty(exports, "getDomainLocale", {
-        enumerable: true,
-        get: function () {
-          return getDomainLocale;
-        },
-      });
-      const _normalizetrailingslash = __webpack_require__(4869);
-      const basePath =
-        /* unused pure expression or super */ null && (false || "");
-      function getDomainLocale(path, locale, locales, domainLocales) {
-        if (false) {
-        } else {
-          return false;
-        }
-      }
-      if (
-        (typeof exports.default === "function" ||
-          (typeof exports.default === "object" && exports.default !== null)) &&
-        typeof exports.default.__esModule === "undefined"
-      ) {
-        Object.defineProperty(exports.default, "__esModule", {
-          value: true,
-        });
-        Object.assign(exports.default, exports);
-        module.exports = exports.default;
-      } //# sourceMappingURL=get-domain-locale.js.map
-
-      /***/
-    },
-
-    /***/ 3947: /***/ (module, exports, __webpack_require__) => {
+    /***/ 591: /***/ (module, exports, __webpack_require__) => {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -146,17 +28,17 @@
       const _react = /*#__PURE__*/ _interop_require_wildcard._(
         __webpack_require__(148)
       );
-      const _resolvehref = __webpack_require__(3161);
-      const _islocalurl = __webpack_require__(2309);
-      const _formaturl = __webpack_require__(3768);
-      const _utils = __webpack_require__(5554);
-      const _addlocale = __webpack_require__(7591);
-      const _routercontextsharedruntime = __webpack_require__(3556);
-      const _useintersection = __webpack_require__(5624);
-      const _getdomainlocale = __webpack_require__(3857);
-      const _addbasepath = __webpack_require__(4356);
-      const _usemergedref = __webpack_require__(4985);
-      const _erroronce = __webpack_require__(3199);
+      const _resolvehref = __webpack_require__(5837);
+      const _islocalurl = __webpack_require__(5953);
+      const _formaturl = __webpack_require__(6212);
+      const _utils = __webpack_require__(6950);
+      const _addlocale = __webpack_require__(6467);
+      const _routercontextsharedruntime = __webpack_require__(6712);
+      const _useintersection = __webpack_require__(9692);
+      const _getdomainlocale = __webpack_require__(6850);
+      const _addbasepath = __webpack_require__(4928);
+      const _usemergedref = __webpack_require__(1765);
+      const _erroronce = __webpack_require__(8659);
       const prefetched = new Set();
       function prefetch(router, href, as, options) {
         if (false) {
@@ -545,7 +427,17 @@
       /***/
     },
 
-    /***/ 4985: /***/ (module, exports, __webpack_require__) => {
+    /***/ 1148: /***/ (
+      module,
+      __unused_webpack_exports,
+      __webpack_require__
+    ) => {
+      module.exports = __webpack_require__(591);
+
+      /***/
+    },
+
+    /***/ 1765: /***/ (module, exports, __webpack_require__) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -623,7 +515,125 @@
       /***/
     },
 
-    /***/ 5624: /***/ (module, exports, __webpack_require__) => {
+    /***/ 5436: /***/ (
+      __unused_webpack_module,
+      __webpack_exports__,
+      __webpack_require__
+    ) => {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+      /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+        /* harmony export */ __N_SSP: () => /* binding */ __N_SSP,
+        /* harmony export */ default: () => __WEBPACK_DEFAULT_EXPORT__,
+        /* harmony export */
+      });
+      /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
+        __webpack_require__(5640);
+      /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ =
+        __webpack_require__(1148);
+      /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default =
+        /*#__PURE__*/ __webpack_require__.n(
+          next_link__WEBPACK_IMPORTED_MODULE_1__
+        );
+
+      function aLink(props) {
+        return /*#__PURE__*/ (0,
+        react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
+          children: [
+            /*#__PURE__*/ (0,
+            react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3", {
+              children: "A Link page!",
+            }),
+            /*#__PURE__*/ (0,
+            react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
+              next_link__WEBPACK_IMPORTED_MODULE_1___default(),
+              {
+                href: "/",
+                children: "Go to /",
+              }
+            ),
+          ],
+        });
+      }
+      var __N_SSP = true;
+      /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = aLink;
+
+      /***/
+    },
+
+    /***/ 6850: /***/ (module, exports, __webpack_require__) => {
+      "use strict";
+
+      Object.defineProperty(exports, "__esModule", {
+        value: true,
+      });
+      Object.defineProperty(exports, "getDomainLocale", {
+        enumerable: true,
+        get: function () {
+          return getDomainLocale;
+        },
+      });
+      const _normalizetrailingslash = __webpack_require__(6457);
+      const basePath =
+        /* unused pure expression or super */ null && (false || "");
+      function getDomainLocale(path, locale, locales, domainLocales) {
+        if (false) {
+        } else {
+          return false;
+        }
+      }
+      if (
+        (typeof exports.default === "function" ||
+          (typeof exports.default === "object" && exports.default !== null)) &&
+        typeof exports.default.__esModule === "undefined"
+      ) {
+        Object.defineProperty(exports.default, "__esModule", {
+          value: true,
+        });
+        Object.assign(exports.default, exports);
+        module.exports = exports.default;
+      } //# sourceMappingURL=get-domain-locale.js.map
+
+      /***/
+    },
+
+    /***/ 8659: /***/ (__unused_webpack_module, exports) => {
+      "use strict";
+
+      Object.defineProperty(exports, "__esModule", {
+        value: true,
+      });
+      Object.defineProperty(exports, "errorOnce", {
+        enumerable: true,
+        get: function () {
+          return errorOnce;
+        },
+      });
+      let errorOnce = (_) => {};
+      if (false) {
+      } //# sourceMappingURL=error-once.js.map
+
+      /***/
+    },
+
+    /***/ 9666: /***/ (
+      __unused_webpack_module,
+      __unused_webpack_exports,
+      __webpack_require__
+    ) => {
+      (window.__NEXT_P = window.__NEXT_P || []).push([
+        "/link",
+        function () {
+          return __webpack_require__(5436);
+        },
+      ]);
+      if (false) {
+      }
+
+      /***/
+    },
+
+    /***/ 9692: /***/ (module, exports, __webpack_require__) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -636,7 +646,7 @@
         },
       });
       const _react = __webpack_require__(148);
-      const _requestidlecallback = __webpack_require__(3543);
+      const _requestidlecallback = __webpack_require__(315);
       const hasIntersectionObserver =
         typeof IntersectionObserver === "function";
       const observers = new Map();
@@ -748,23 +758,13 @@
 
       /***/
     },
-
-    /***/ 8770: /***/ (
-      module,
-      __unused_webpack_exports,
-      __webpack_require__
-    ) => {
-      module.exports = __webpack_require__(3947);
-
-      /***/
-    },
   },
   /******/ (__webpack_require__) => {
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [636, 6593, 8792], () =>
-      __webpack_exec__(3568)
+      __webpack_exec__(9666)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for routerDirect-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [188],
   {
-    /***/ 3618: /***/ (
+    /***/ 76: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -16,7 +16,7 @@
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(5640);
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(4631);
+        __webpack_require__(9413);
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           next_router__WEBPACK_IMPORTED_MODULE_1__
@@ -36,17 +36,7 @@
       /***/
     },
 
-    /***/ 4631: /***/ (
-      module,
-      __unused_webpack_exports,
-      __webpack_require__
-    ) => {
-      module.exports = __webpack_require__(7086);
-
-      /***/
-    },
-
-    /***/ 7824: /***/ (
+    /***/ 1810: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -54,7 +44,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/routerDirect",
         function () {
-          return __webpack_require__(3618);
+          return __webpack_require__(76);
         },
       ]);
       if (false) {
@@ -62,13 +52,23 @@
 
       /***/
     },
+
+    /***/ 9413: /***/ (
+      module,
+      __unused_webpack_exports,
+      __webpack_require__
+    ) => {
+      module.exports = __webpack_require__(5282);
+
+      /***/
+    },
   },
   /******/ (__webpack_require__) => {
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [636, 6593, 8792], () =>
-      __webpack_exec__(7824)
+      __webpack_exec__(1810)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for script-HASH.js
@@ -1,24 +1,17 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [1209],
   {
-    /***/ 1984: /***/ (
-      __unused_webpack_module,
+    /***/ 2227: /***/ (
+      module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      (window.__NEXT_P = window.__NEXT_P || []).push([
-        "/script",
-        function () {
-          return __webpack_require__(5769);
-        },
-      ]);
-      if (false) {
-      }
+      module.exports = __webpack_require__(5984);
 
       /***/
     },
 
-    /***/ 5769: /***/ (
+    /***/ 3043: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -33,7 +26,7 @@
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(5640);
       /* harmony import */ var next_script__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(8293);
+        __webpack_require__(2227);
       /* harmony import */ var next_script__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           next_script__WEBPACK_IMPORTED_MODULE_1__
@@ -66,12 +59,19 @@
       /***/
     },
 
-    /***/ 8293: /***/ (
-      module,
+    /***/ 3642: /***/ (
+      __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      module.exports = __webpack_require__(900);
+      (window.__NEXT_P = window.__NEXT_P || []).push([
+        "/script",
+        function () {
+          return __webpack_require__(3043);
+        },
+      ]);
+      if (false) {
+      }
 
       /***/
     },
@@ -81,7 +81,7 @@
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [636, 6593, 8792], () =>
-      __webpack_exec__(1984)
+      __webpack_exec__(3642)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for withRouter-HASH.js
@@ -1,34 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [3263],
   {
-    /***/ 4631: /***/ (
-      module,
-      __unused_webpack_exports,
-      __webpack_require__
-    ) => {
-      module.exports = __webpack_require__(7086);
-
-      /***/
-    },
-
-    /***/ 9216: /***/ (
-      __unused_webpack_module,
-      __unused_webpack_exports,
-      __webpack_require__
-    ) => {
-      (window.__NEXT_P = window.__NEXT_P || []).push([
-        "/withRouter",
-        function () {
-          return __webpack_require__(9803);
-        },
-      ]);
-      if (false) {
-      }
-
-      /***/
-    },
-
-    /***/ 9803: /***/ (
+    /***/ 1089: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -43,7 +16,7 @@
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(5640);
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(4631);
+        __webpack_require__(9413);
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           next_router__WEBPACK_IMPORTED_MODULE_1__
@@ -61,13 +34,40 @@
 
       /***/
     },
+
+    /***/ 3962: /***/ (
+      __unused_webpack_module,
+      __unused_webpack_exports,
+      __webpack_require__
+    ) => {
+      (window.__NEXT_P = window.__NEXT_P || []).push([
+        "/withRouter",
+        function () {
+          return __webpack_require__(1089);
+        },
+      ]);
+      if (false) {
+      }
+
+      /***/
+    },
+
+    /***/ 9413: /***/ (
+      module,
+      __unused_webpack_exports,
+      __webpack_require__
+    ) => {
+      module.exports = __webpack_require__(5282);
+
+      /***/
+    },
   },
   /******/ (__webpack_require__) => {
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [636, 6593, 8792], () =>
-      __webpack_exec__(9216)
+      __webpack_exec__(3962)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for 1733-HASH.js

Diff too large to display

Diff for 4719-HASH.js

Diff too large to display

Diff for main-HASH.js

Diff too large to display

Diff for app-page-exp..ntime.dev.js
failed to diff
Diff for app-page-tur..ntime.dev.js
failed to diff
Diff for app-page-tur..ntime.dev.js
failed to diff
Diff for app-page.runtime.dev.js
failed to diff
Diff for pages.runtime.dev.js

Diff too large to display

Commit: bd2cd68

@ijjk
Copy link
Member

ijjk commented May 15, 2025

Failing test suites

Commit: bd2cd68

pnpm test test/integration/image-optimizer/test/content-disposition-type.test.ts (turbopack)

  • with contentDispositionType inline > dev support with next.config.js > should normalize invalid status codes
  • with contentDispositionType inline > dev support with next.config.js > should timeout for upstream image exceeding 7 seconds
  • with contentDispositionType inline > dev support with next.config.js > should return home page
  • with contentDispositionType inline > dev support with next.config.js > should handle non-ascii characters in image url
  • with contentDispositionType inline > dev support with next.config.js > should maintain icns
  • with contentDispositionType inline > dev support with next.config.js > should maintain pic/pct
  • with contentDispositionType inline > dev support with next.config.js > should maintain animated gif
  • with contentDispositionType inline > dev support with next.config.js > should maintain animated png
  • with contentDispositionType inline > dev support with next.config.js > should maintain animated png 2
  • with contentDispositionType inline > dev support with next.config.js > should maintain animated webp
  • with contentDispositionType inline > dev support with next.config.js > should not allow vector svg
  • with contentDispositionType inline > dev support with next.config.js > should not allow svg with application header
  • with contentDispositionType inline > dev support with next.config.js > should not allow svg with comma header
  • with contentDispositionType inline > dev support with next.config.js > should not allow svg with uppercase header
  • with contentDispositionType inline > dev support with next.config.js > should not allow svg with wrong header
  • with contentDispositionType inline > dev support with next.config.js > should maintain ico format
  • with contentDispositionType inline > dev support with next.config.js > should maintain jpg format for old Safari
  • with contentDispositionType inline > dev support with next.config.js > should maintain png format for old Safari
  • with contentDispositionType inline > dev support with next.config.js > should downlevel webp format to jpeg for old Safari
  • with contentDispositionType inline > dev support with next.config.js > should downlevel avif format to jpeg for old Safari
  • with contentDispositionType inline > dev support with next.config.js > should fail when url is missing
  • with contentDispositionType inline > dev support with next.config.js > should fail when w is missing
  • with contentDispositionType inline > dev support with next.config.js > should fail when q is missing
  • with contentDispositionType inline > dev support with next.config.js > should fail when q is greater than 100
  • with contentDispositionType inline > dev support with next.config.js > should fail when q is less than 1
  • with contentDispositionType inline > dev support with next.config.js > should fail when w is 0
  • with contentDispositionType inline > dev support with next.config.js > should fail when w is less than 0
  • with contentDispositionType inline > dev support with next.config.js > should fail when w is not a number
  • with contentDispositionType inline > dev support with next.config.js > should fail when w is not an integer
  • with contentDispositionType inline > dev support with next.config.js > should fail when q is not a number
  • with contentDispositionType inline > dev support with next.config.js > should fail when q is not an integer
  • with contentDispositionType inline > dev support with next.config.js > should fail when domain is not defined in next.config.js
  • with contentDispositionType inline > dev support with next.config.js > should fail when width is not in next.config.js
  • with contentDispositionType inline > dev support with next.config.js > should emit blur svg when width is 8 in dev but not prod
  • with contentDispositionType inline > dev support with next.config.js > should emit blur svg when width is less than 8 in dev but not prod
  • with contentDispositionType inline > dev support with next.config.js > should resize relative url and webp Firefox accept header
  • with contentDispositionType inline > dev support with next.config.js > should resize relative url and png accept header
  • with contentDispositionType inline > dev support with next.config.js > should resize relative url with invalid accept header as png
  • with contentDispositionType inline > dev support with next.config.js > should resize relative url with invalid accept header as gif
  • with contentDispositionType inline > dev support with next.config.js > should resize relative url with invalid accept header as tiff
  • with contentDispositionType inline > dev support with next.config.js > should resize gif (not animated)
  • with contentDispositionType inline > dev support with next.config.js > should resize tiff
  • with contentDispositionType inline > dev support with next.config.js > should resize avif
  • with contentDispositionType inline > dev support with next.config.js > should resize relative url and old Chrome accept header as webp
  • with contentDispositionType inline > dev support with next.config.js > should resize relative url and new Chrome accept header as avif
  • with contentDispositionType inline > dev support with next.config.js > should resize avif and maintain format
  • with contentDispositionType inline > dev support with next.config.js > should compress avif smaller than webp at q=100
  • with contentDispositionType inline > dev support with next.config.js > should compress avif smaller than webp at q=75
  • with contentDispositionType inline > dev support with next.config.js > should compress avif smaller than webp at q=50
  • with contentDispositionType inline > dev support with next.config.js > should resize absolute url from localhost
  • with contentDispositionType inline > dev support with next.config.js > should automatically detect image type when content-type is octet-stream
  • with contentDispositionType inline > dev support with next.config.js > should use cache and stale-while-revalidate when query is the same for external image
  • with contentDispositionType inline > dev support with next.config.js > should fail when url has file protocol
  • with contentDispositionType inline > dev support with next.config.js > should fail when url has ftp protocol
  • with contentDispositionType inline > dev support with next.config.js > should fail when url is too long
  • with contentDispositionType inline > dev support with next.config.js > should fail when url is protocol relative
  • with contentDispositionType inline > dev support with next.config.js > should fail when internal url is not an image
  • with contentDispositionType inline > dev support with next.config.js > should fail when url fails to load an image
  • with contentDispositionType inline > dev support with next.config.js > should use cache and stale-while-revalidate when query is the same for internal image
  • with contentDispositionType inline > dev support with next.config.js > should use cached image file when parameters are the same for animated gif
  • with contentDispositionType inline > dev support with next.config.js > should set 304 status without body when etag matches if-none-match
  • with contentDispositionType inline > dev support with next.config.js > should maintain bmp
  • with contentDispositionType inline > dev support with next.config.js > should not resize if requested width is larger than original source image
  • with contentDispositionType inline > dev support with next.config.js > should set cache-control to immutable for static images
  • with contentDispositionType inline > dev support with next.config.js > should error if the resource isn't a valid image
  • with contentDispositionType inline > dev support with next.config.js > should error if the image file does not exist
  • with contentDispositionType inline > dev support with next.config.js > should handle concurrent requests
  • with contentDispositionType inline > dev support with next.config.js > recursive url is not allowed > should fail with relative next image url
  • with contentDispositionType inline > dev support with next.config.js > recursive url is not allowed > should fail with encoded relative image url
  • with contentDispositionType inline > dev support with next.config.js > recursive url is not allowed > should pass with absolute next image url
  • with contentDispositionType inline > dev support with next.config.js > recursive url is not allowed > should fail with relative image url with assetPrefix
Expand output

● with contentDispositionType inline › dev support with next.config.js › should normalize invalid status codes

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should timeout for upstream image exceeding 7 seconds

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should handle non-ascii characters in image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should maintain icns

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should maintain pic/pct

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should maintain animated png 2

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should not allow vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should not allow svg with application header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should not allow svg with comma header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should not allow svg with uppercase header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should not allow svg with wrong header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should maintain ico format

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should maintain jpg format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should maintain png format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should downlevel webp format to jpeg for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should downlevel avif format to jpeg for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should fail when w is 0

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should fail when w is less than 0

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should fail when w is not an integer

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should fail when q is not an integer

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should emit blur svg when width is 8 in dev but not prod

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should emit blur svg when width is less than 8 in dev but not prod

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should resize gif (not animated)

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should resize tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should resize avif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should resize relative url and old Chrome accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should resize relative url and new Chrome accept header as avif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should resize avif and maintain format

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should compress avif smaller than webp at q=100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should compress avif smaller than webp at q=75

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should compress avif smaller than webp at q=50

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should automatically detect image type when content-type is octet-stream

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should use cache and stale-while-revalidate when query is the same for external image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should fail when url is too long

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should fail when url is protocol relative

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › recursive url is not allowed › should fail with relative next image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › recursive url is not allowed › should fail with encoded relative image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › recursive url is not allowed › should pass with absolute next image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › recursive url is not allowed › should fail with relative image url with assetPrefix

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should fail when internal url is not an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should use cache and stale-while-revalidate when query is the same for internal image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should use cached image file when parameters are the same for animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should set 304 status without body when etag matches if-none-match

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should maintain bmp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should set cache-control to immutable for static images

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should error if the resource isn't a valid image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should error if the image file does not exist

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with contentDispositionType inline › dev support with next.config.js › should handle concurrent requests

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/image-optimizer/test/dangerously-allow-svg.test.ts (turbopack)

  • with dangerouslyAllowSVG config > dev support with next.config.js > should normalize invalid status codes
  • with dangerouslyAllowSVG config > dev support with next.config.js > should timeout for upstream image exceeding 7 seconds
  • with dangerouslyAllowSVG config > dev support with next.config.js > should return home page
  • with dangerouslyAllowSVG config > dev support with next.config.js > should handle non-ascii characters in image url
  • with dangerouslyAllowSVG config > dev support with next.config.js > should maintain icns
  • with dangerouslyAllowSVG config > dev support with next.config.js > should maintain pic/pct
  • with dangerouslyAllowSVG config > dev support with next.config.js > should maintain animated gif
  • with dangerouslyAllowSVG config > dev support with next.config.js > should maintain animated png
  • with dangerouslyAllowSVG config > dev support with next.config.js > should maintain animated png 2
  • with dangerouslyAllowSVG config > dev support with next.config.js > should maintain animated webp
  • with dangerouslyAllowSVG config > dev support with next.config.js > should maintain vector svg
  • with dangerouslyAllowSVG config > dev support with next.config.js > should maintain ico format
  • with dangerouslyAllowSVG config > dev support with next.config.js > should maintain jpg format for old Safari
  • with dangerouslyAllowSVG config > dev support with next.config.js > should maintain png format for old Safari
  • with dangerouslyAllowSVG config > dev support with next.config.js > should downlevel webp format to jpeg for old Safari
  • with dangerouslyAllowSVG config > dev support with next.config.js > should downlevel avif format to jpeg for old Safari
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when url is missing
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when w is missing
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when q is missing
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when q is greater than 100
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when q is less than 1
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when w is 0
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when w is less than 0
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when w is not a number
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when w is not an integer
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when q is not a number
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when q is not an integer
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when domain is not defined in next.config.js
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when width is not in next.config.js
  • with dangerouslyAllowSVG config > dev support with next.config.js > should emit blur svg when width is 8 in dev but not prod
  • with dangerouslyAllowSVG config > dev support with next.config.js > should emit blur svg when width is less than 8 in dev but not prod
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize relative url and webp Firefox accept header
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize relative url and png accept header
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize relative url with invalid accept header as png
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize relative url with invalid accept header as gif
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize relative url with invalid accept header as tiff
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize gif (not animated)
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize tiff
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize avif
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize relative url and old Chrome accept header as webp
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize relative url and new Chrome accept header as avif
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize avif and maintain format
  • with dangerouslyAllowSVG config > dev support with next.config.js > should compress avif smaller than webp at q=100
  • with dangerouslyAllowSVG config > dev support with next.config.js > should compress avif smaller than webp at q=75
  • with dangerouslyAllowSVG config > dev support with next.config.js > should compress avif smaller than webp at q=50
  • with dangerouslyAllowSVG config > dev support with next.config.js > should resize absolute url from localhost
  • with dangerouslyAllowSVG config > dev support with next.config.js > should automatically detect image type when content-type is octet-stream
  • with dangerouslyAllowSVG config > dev support with next.config.js > should use cache and stale-while-revalidate when query is the same for external image
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when url has file protocol
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when url has ftp protocol
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when url is too long
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when url is protocol relative
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when internal url is not an image
  • with dangerouslyAllowSVG config > dev support with next.config.js > should fail when url fails to load an image
  • with dangerouslyAllowSVG config > dev support with next.config.js > should use cache and stale-while-revalidate when query is the same for internal image
  • with dangerouslyAllowSVG config > dev support with next.config.js > should use cached image file when parameters are the same for svg
  • with dangerouslyAllowSVG config > dev support with next.config.js > should use cached image file when parameters are the same for animated gif
  • with dangerouslyAllowSVG config > dev support with next.config.js > should set 304 status without body when etag matches if-none-match
  • with dangerouslyAllowSVG config > dev support with next.config.js > should maintain bmp
  • with dangerouslyAllowSVG config > dev support with next.config.js > should not resize if requested width is larger than original source image
  • with dangerouslyAllowSVG config > dev support with next.config.js > should set cache-control to immutable for static images
  • with dangerouslyAllowSVG config > dev support with next.config.js > should error if the resource isn't a valid image
  • with dangerouslyAllowSVG config > dev support with next.config.js > should error if the image file does not exist
  • with dangerouslyAllowSVG config > dev support with next.config.js > should handle concurrent requests
  • with dangerouslyAllowSVG config > dev support with next.config.js > recursive url is not allowed > should fail with relative next image url
  • with dangerouslyAllowSVG config > dev support with next.config.js > recursive url is not allowed > should fail with encoded relative image url
  • with dangerouslyAllowSVG config > dev support with next.config.js > recursive url is not allowed > should pass with absolute next image url
  • with dangerouslyAllowSVG config > dev support with next.config.js > recursive url is not allowed > should fail with relative image url with assetPrefix
Expand output

● with dangerouslyAllowSVG config › dev support with next.config.js › should normalize invalid status codes

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should timeout for upstream image exceeding 7 seconds

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should handle non-ascii characters in image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should maintain icns

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should maintain pic/pct

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should maintain animated png 2

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should maintain ico format

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should maintain jpg format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should maintain png format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should downlevel webp format to jpeg for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should downlevel avif format to jpeg for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should fail when w is 0

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should fail when w is less than 0

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should fail when w is not an integer

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should fail when q is not an integer

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should emit blur svg when width is 8 in dev but not prod

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should emit blur svg when width is less than 8 in dev but not prod

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should resize gif (not animated)

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should resize tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should resize avif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should resize relative url and old Chrome accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should resize relative url and new Chrome accept header as avif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should resize avif and maintain format

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should compress avif smaller than webp at q=100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should compress avif smaller than webp at q=75

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should compress avif smaller than webp at q=50

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should automatically detect image type when content-type is octet-stream

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should use cache and stale-while-revalidate when query is the same for external image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should fail when url is too long

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should fail when url is protocol relative

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › recursive url is not allowed › should fail with relative next image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › recursive url is not allowed › should fail with encoded relative image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › recursive url is not allowed › should pass with absolute next image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › recursive url is not allowed › should fail with relative image url with assetPrefix

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should fail when internal url is not an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should use cache and stale-while-revalidate when query is the same for internal image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should use cached image file when parameters are the same for svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should use cached image file when parameters are the same for animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should set 304 status without body when etag matches if-none-match

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should maintain bmp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should set cache-control to immutable for static images

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should error if the resource isn't a valid image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should error if the image file does not exist

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with dangerouslyAllowSVG config › dev support with next.config.js › should handle concurrent requests

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/image-optimizer/test/disable-write-to-cache-dir.test.ts (turbopack)

  • with isrFlushToDisk false config > dev support w/o next.config.js > should return home page
  • with isrFlushToDisk false config > dev support w/o next.config.js > should handle non-ascii characters in image url
  • with isrFlushToDisk false config > dev support w/o next.config.js > should maintain icns
  • with isrFlushToDisk false config > dev support w/o next.config.js > should maintain pic/pct
  • with isrFlushToDisk false config > dev support w/o next.config.js > should maintain animated gif
  • with isrFlushToDisk false config > dev support w/o next.config.js > should maintain animated png
  • with isrFlushToDisk false config > dev support w/o next.config.js > should maintain animated png 2
  • with isrFlushToDisk false config > dev support w/o next.config.js > should maintain animated webp
  • with isrFlushToDisk false config > dev support w/o next.config.js > should not allow vector svg
  • with isrFlushToDisk false config > dev support w/o next.config.js > should not allow svg with application header
  • with isrFlushToDisk false config > dev support w/o next.config.js > should not allow svg with comma header
  • with isrFlushToDisk false config > dev support w/o next.config.js > should not allow svg with uppercase header
  • with isrFlushToDisk false config > dev support w/o next.config.js > should not allow svg with wrong header
  • with isrFlushToDisk false config > dev support w/o next.config.js > should maintain ico format
  • with isrFlushToDisk false config > dev support w/o next.config.js > should maintain jpg format for old Safari
  • with isrFlushToDisk false config > dev support w/o next.config.js > should maintain png format for old Safari
  • with isrFlushToDisk false config > dev support w/o next.config.js > should downlevel webp format to jpeg for old Safari
  • with isrFlushToDisk false config > dev support w/o next.config.js > should downlevel avif format to jpeg for old Safari
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when url is missing
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when w is missing
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when q is missing
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when q is greater than 100
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when q is less than 1
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when w is 0
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when w is less than 0
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when w is not a number
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when w is not an integer
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when q is not a number
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when q is not an integer
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when domain is not defined in next.config.js
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when width is not in next.config.js
  • with isrFlushToDisk false config > dev support w/o next.config.js > should emit blur svg when width is 8 in dev but not prod
  • with isrFlushToDisk false config > dev support w/o next.config.js > should emit blur svg when width is less than 8 in dev but not prod
  • with isrFlushToDisk false config > dev support w/o next.config.js > should resize relative url and webp Firefox accept header
  • with isrFlushToDisk false config > dev support w/o next.config.js > should resize relative url and png accept header
  • with isrFlushToDisk false config > dev support w/o next.config.js > should resize relative url with invalid accept header as png
  • with isrFlushToDisk false config > dev support w/o next.config.js > should resize relative url with invalid accept header as gif
  • with isrFlushToDisk false config > dev support w/o next.config.js > should resize relative url with invalid accept header as tiff
  • with isrFlushToDisk false config > dev support w/o next.config.js > should resize gif (not animated)
  • with isrFlushToDisk false config > dev support w/o next.config.js > should resize tiff
  • with isrFlushToDisk false config > dev support w/o next.config.js > should resize avif
  • with isrFlushToDisk false config > dev support w/o next.config.js > should resize relative url and old Chrome accept header as webp
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when url has file protocol
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when url has ftp protocol
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when url is too long
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when url is protocol relative
  • with isrFlushToDisk false config > dev support w/o next.config.js > should fail when internal url is not an image
  • with isrFlushToDisk false config > dev support w/o next.config.js > should use cache and stale-while-revalidate when query is the same for internal image
  • with isrFlushToDisk false config > dev support w/o next.config.js > should use cached image file when parameters are the same for animated gif
  • with isrFlushToDisk false config > dev support w/o next.config.js > should set 304 status without body when etag matches if-none-match
  • with isrFlushToDisk false config > dev support w/o next.config.js > should maintain bmp
  • with isrFlushToDisk false config > dev support w/o next.config.js > should not resize if requested width is larger than original source image
  • with isrFlushToDisk false config > dev support w/o next.config.js > should set cache-control to immutable for static images
  • with isrFlushToDisk false config > dev support w/o next.config.js > should error if the resource isn't a valid image
  • with isrFlushToDisk false config > dev support w/o next.config.js > should error if the image file does not exist
  • with isrFlushToDisk false config > dev support w/o next.config.js > recursive url is not allowed > should fail with relative next image url
  • with isrFlushToDisk false config > dev support w/o next.config.js > recursive url is not allowed > should fail with encoded relative image url
  • with isrFlushToDisk false config > dev support w/o next.config.js > recursive url is not allowed > should fail with absolute next image url
  • with isrFlushToDisk false config > dev support w/o next.config.js > recursive url is not allowed > should fail with relative image url with assetPrefix
  • with isrFlushToDisk false config > dev support with next.config.js > should normalize invalid status codes
  • with isrFlushToDisk false config > dev support with next.config.js > should timeout for upstream image exceeding 7 seconds
  • with isrFlushToDisk false config > dev support with next.config.js > should return home page
  • with isrFlushToDisk false config > dev support with next.config.js > should handle non-ascii characters in image url
  • with isrFlushToDisk false config > dev support with next.config.js > should maintain icns
  • with isrFlushToDisk false config > dev support with next.config.js > should maintain pic/pct
  • with isrFlushToDisk false config > dev support with next.config.js > should maintain animated gif
  • with isrFlushToDisk false config > dev support with next.config.js > should maintain animated png
  • with isrFlushToDisk false config > dev support with next.config.js > should maintain animated png 2
  • with isrFlushToDisk false config > dev support with next.config.js > should maintain animated webp
  • with isrFlushToDisk false config > dev support with next.config.js > should not allow vector svg
  • with isrFlushToDisk false config > dev support with next.config.js > should not allow svg with application header
  • with isrFlushToDisk false config > dev support with next.config.js > should not allow svg with comma header
  • with isrFlushToDisk false config > dev support with next.config.js > should not allow svg with uppercase header
  • with isrFlushToDisk false config > dev support with next.config.js > should not allow svg with wrong header
  • with isrFlushToDisk false config > dev support with next.config.js > should maintain ico format
  • with isrFlushToDisk false config > dev support with next.config.js > should maintain jpg format for old Safari
  • with isrFlushToDisk false config > dev support with next.config.js > should maintain png format for old Safari
  • with isrFlushToDisk false config > dev support with next.config.js > should downlevel webp format to jpeg for old Safari
  • with isrFlushToDisk false config > dev support with next.config.js > should downlevel avif format to jpeg for old Safari
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when url is missing
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when w is missing
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when q is missing
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when q is greater than 100
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when q is less than 1
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when w is 0
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when w is less than 0
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when w is not a number
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when w is not an integer
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when q is not a number
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when q is not an integer
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when domain is not defined in next.config.js
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when width is not in next.config.js
  • with isrFlushToDisk false config > dev support with next.config.js > should emit blur svg when width is 8 in dev but not prod
  • with isrFlushToDisk false config > dev support with next.config.js > should emit blur svg when width is less than 8 in dev but not prod
  • with isrFlushToDisk false config > dev support with next.config.js > should resize relative url and webp Firefox accept header
  • with isrFlushToDisk false config > dev support with next.config.js > should resize relative url and png accept header
  • with isrFlushToDisk false config > dev support with next.config.js > should resize relative url with invalid accept header as png
  • with isrFlushToDisk false config > dev support with next.config.js > should resize relative url with invalid accept header as gif
  • with isrFlushToDisk false config > dev support with next.config.js > should resize relative url with invalid accept header as tiff
  • with isrFlushToDisk false config > dev support with next.config.js > should resize gif (not animated)
  • with isrFlushToDisk false config > dev support with next.config.js > should resize tiff
  • with isrFlushToDisk false config > dev support with next.config.js > should resize avif
  • with isrFlushToDisk false config > dev support with next.config.js > should resize relative url and old Chrome accept header as webp
  • with isrFlushToDisk false config > dev support with next.config.js > should resize relative url and new Chrome accept header as avif
  • with isrFlushToDisk false config > dev support with next.config.js > should resize avif and maintain format
  • with isrFlushToDisk false config > dev support with next.config.js > should compress avif smaller than webp at q=100
  • with isrFlushToDisk false config > dev support with next.config.js > should compress avif smaller than webp at q=75
  • with isrFlushToDisk false config > dev support with next.config.js > should compress avif smaller than webp at q=50
  • with isrFlushToDisk false config > dev support with next.config.js > should resize absolute url from localhost
  • with isrFlushToDisk false config > dev support with next.config.js > should automatically detect image type when content-type is octet-stream
  • with isrFlushToDisk false config > dev support with next.config.js > should use cache and stale-while-revalidate when query is the same for external image
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when url has file protocol
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when url has ftp protocol
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when url is too long
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when url is protocol relative
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when internal url is not an image
  • with isrFlushToDisk false config > dev support with next.config.js > should fail when url fails to load an image
  • with isrFlushToDisk false config > dev support with next.config.js > should use cache and stale-while-revalidate when query is the same for internal image
  • with isrFlushToDisk false config > dev support with next.config.js > should use cached image file when parameters are the same for animated gif
  • with isrFlushToDisk false config > dev support with next.config.js > should set 304 status without body when etag matches if-none-match
  • with isrFlushToDisk false config > dev support with next.config.js > should maintain bmp
  • with isrFlushToDisk false config > dev support with next.config.js > should not resize if requested width is larger than original source image
  • with isrFlushToDisk false config > dev support with next.config.js > should set cache-control to immutable for static images
  • with isrFlushToDisk false config > dev support with next.config.js > should error if the resource isn't a valid image
  • with isrFlushToDisk false config > dev support with next.config.js > should error if the image file does not exist
  • with isrFlushToDisk false config > dev support with next.config.js > should handle concurrent requests
  • with isrFlushToDisk false config > dev support with next.config.js > recursive url is not allowed > should fail with relative next image url
  • with isrFlushToDisk false config > dev support with next.config.js > recursive url is not allowed > should fail with encoded relative image url
  • with isrFlushToDisk false config > dev support with next.config.js > recursive url is not allowed > should pass with absolute next image url
  • with isrFlushToDisk false config > dev support with next.config.js > recursive url is not allowed > should fail with relative image url with assetPrefix
Expand output

● with isrFlushToDisk false config › dev support w/o next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should handle non-ascii characters in image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should maintain icns

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should maintain pic/pct

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should maintain animated png 2

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should not allow vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should not allow svg with application header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should not allow svg with comma header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should not allow svg with uppercase header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should not allow svg with wrong header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should maintain ico format

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should maintain jpg format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should maintain png format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should downlevel webp format to jpeg for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should downlevel avif format to jpeg for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when q is greater than 100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when q is less than 1

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when w is 0

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when w is less than 0

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when w is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when w is not an integer

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when q is not a number

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when q is not an integer

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when width is not in next.config.js

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should emit blur svg when width is 8 in dev but not prod

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should emit blur svg when width is less than 8 in dev but not prod

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should resize relative url and webp Firefox accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should resize relative url and png accept header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should resize gif (not animated)

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should resize tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should resize avif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should resize relative url and old Chrome accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when url has file protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when url has ftp protocol

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when url is too long

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when url is protocol relative

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › recursive url is not allowed › should fail with relative next image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › recursive url is not allowed › should fail with encoded relative image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › recursive url is not allowed › should fail with absolute next image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › recursive url is not allowed › should fail with relative image url with assetPrefix

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should fail when internal url is not an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should use cache and stale-while-revalidate when query is the same for internal image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should use cached image file when parameters are the same for animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should set 304 status without body when etag matches if-none-match

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should maintain bmp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should set cache-control to immutable for static images

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should error if the resource isn't a valid image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support w/o next.config.js › should error if the image file does not exist

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1523:18)

● with isrFlushToDisk false config › dev support with next.config.js › should normalize invalid status codes

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should timeout for upstream image exceeding 7 seconds

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should return home page

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should handle non-ascii characters in image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should maintain icns

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should maintain pic/pct

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should maintain animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should maintain animated png

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should maintain animated png 2

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should maintain animated webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should not allow vector svg

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should not allow svg with application header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should not allow svg with comma header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should not allow svg with uppercase header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should not allow svg with wrong header

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should maintain ico format

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should maintain jpg format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should maintain png format for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should downlevel webp format to jpeg for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should downlevel avif format to jpeg for old Safari

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should fail when url is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should fail when w is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should fail when q is missing

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should fail when w is 0

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should fail when w is less than 0

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should fail when w is not an integer

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should fail when q is not an integer

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should emit blur svg when width is 8 in dev but not prod

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should emit blur svg when width is less than 8 in dev but not prod

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should resize gif (not animated)

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should resize tiff

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should resize avif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should resize relative url and old Chrome accept header as webp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should resize relative url and new Chrome accept header as avif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should resize avif and maintain format

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should compress avif smaller than webp at q=100

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should compress avif smaller than webp at q=75

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should compress avif smaller than webp at q=50

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should resize absolute url from localhost

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should automatically detect image type when content-type is octet-stream

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should use cache and stale-while-revalidate when query is the same for external image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

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

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should fail when url is too long

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should fail when url is protocol relative

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › recursive url is not allowed › should fail with relative next image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › recursive url is not allowed › should fail with encoded relative image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › recursive url is not allowed › should pass with absolute next image url

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › recursive url is not allowed › should fail with relative image url with assetPrefix

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should fail when internal url is not an image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should use cache and stale-while-revalidate when query is the same for internal image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should use cached image file when parameters are the same for animated gif

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should set 304 status without body when etag matches if-none-match

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should maintain bmp

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › 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 = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should set cache-control to immutable for static images

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should error if the resource isn't a valid image

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should error if the image file does not exist

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

● with isrFlushToDisk false config › dev support with next.config.js › should handle concurrent requests

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/image-optimizer/test/util.ts:1570:18)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/export-image-loader-legacy/test/index.test.js (turbopack)

  • Export with cloudinary loader next/legacy/image component > production mode > should build successfully
  • Export with cloudinary loader next/legacy/image component > production mode > should contain img element in html output
  • Export with custom loader config but no loader prop on next/legacy/image > production mode > should fail build
  • Export with custom loader next/legacy/image component > production mode > should build successfully
  • Export with custom loader next/legacy/image component > production mode > should contain img element with same src in html output
  • Export with unoptimized next/legacy/image component > production mode > should build successfully
  • Export with unoptimized next/legacy/image component > production mode > should contain img element with same src in html output
Expand output

● Export with cloudinary loader next/legacy/image component › production mode › should build successfully

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader-legacy/test/index.test.js:18:26)

● Export with cloudinary loader next/legacy/image component › production mode › should contain img element in html output

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader-legacy/test/index.test.js:18:26)

● Export with custom loader next/legacy/image component › production mode › should build successfully

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader-legacy/test/index.test.js:54:26)

● Export with custom loader next/legacy/image component › production mode › should contain img element with same src in html output

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader-legacy/test/index.test.js:54:26)

● Export with custom loader config but no loader prop on next/legacy/image › production mode › should fail build

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader-legacy/test/index.test.js:94:26)

● Export with unoptimized next/legacy/image component › production mode › should build successfully

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader-legacy/test/index.test.js:127:26)

● Export with unoptimized next/legacy/image component › production mode › should contain img element with same src in html output

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader-legacy/test/index.test.js:127:26)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/export-image-loader/test/index.test.js

  • Export with cloudinary loader next/image component > production mode > should build successfully
  • Export with cloudinary loader next/image component > production mode > should contain img element in html output
  • Export with custom loader config but no loader prop on next/image > production mode > should fail build
  • Export with custom loader next/image component > production mode > should build successfully
  • Export with custom loader next/image component > production mode > should contain img element with same src in html output
  • Export with loaderFile config next/image component > production mode > should build successfully
  • Export with loaderFile config next/image component > production mode > should contain img element with same src in html output
  • Export with unoptimized next/image component > production mode > should build successfully
  • Export with unoptimized next/image component > production mode > should contain img element with same src in html output
Expand output

● Export with cloudinary loader next/image component › production mode › should build successfully

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader/test/index.test.js:18:26)

● Export with cloudinary loader next/image component › production mode › should contain img element in html output

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader/test/index.test.js:18:26)

● Export with custom loader next/image component › production mode › should build successfully

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader/test/index.test.js:53:26)

● Export with custom loader next/image component › production mode › should contain img element with same src in html output

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader/test/index.test.js:53:26)

● Export with custom loader config but no loader prop on next/image › production mode › should fail build

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader/test/index.test.js:92:26)

● Export with loaderFile config next/image component › production mode › should build successfully

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader/test/index.test.js:124:26)

● Export with loaderFile config next/image component › production mode › should contain img element with same src in html output

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader/test/index.test.js:124:26)

● Export with unoptimized next/image component › production mode › should build successfully

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader/test/index.test.js:160:26)

● Export with unoptimized next/image component › production mode › should contain img element with same src in html output

Failed to replace content.

Pattern: { /* replaceme */ }

Content: // prettier-ignore
module.exports = {
  /* replaceme */
}

  769 |     } else if (typeof pattern === 'string') {
  770 |       if (!currentContent.includes(pattern)) {
> 771 |         throw new Error(
      |               ^
  772 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  773 |         )
  774 |       }

  at File.replace (lib/next-test-utils.ts:771:15)
  at Object.replace (integration/export-image-loader/test/index.test.js:160:26)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/app-document-remove-hmr/test/index.test.js (turbopack)

  • _app removal HMR > should HMR when _app is removed
Expand output

● _app removal HMR › should HMR when _app is removed

TIMED OUT: success

<head><meta charset="utf-8" data-next-head=""><meta name="viewport" content="width=device-width" data-next-head=""><noscript data-n-css=""></noscript><script src="/_next/static/chunks/%5Broot-of-the-server%5D__c1b574d0._.js" defer=""></script><script src="/_next/static/chunks/node_modules__pnpm_68da3012._.js" defer=""></script><script src="/_next/static/chunks/test_integration_app-document-remove-hmr_pages__app_5771e187._.js" defer=""></script><script src="/_next/static/chunks/test_integration_app-document-remove-hmr_pages__app_764cca09._.js" defer=""></script><script src="/_next/static/chunks/%5Broot-of-the-server%5D__0d522c81._.js" defer=""></script><script src="/_next/static/chunks/node_modules__pnpm_41d4911f._.js" defer=""></script><script src="/_next/static/chunks/test_integration_app-document-remove-hmr_pages_index_5771e187._.js" defer=""></script><script src="/_next/static/chunks/test_integration_app-document-remove-hmr_pages_index_835379d5._.js" defer=""></script><script src="/_next/static/development/_ssgManifest.js" defer=""></script><script src="/_next/static/development/_buildManifest.js" defer=""></script><noscript id="__next_css__DO_NOT_USE__"></noscript><style>@font-face{font-family:'__nextjs-Geist';font-style:normal;font-weight:400 600;font-display:swap;src:url(/__nextjs_font/geist-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'__nextjs-Geist Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url(/__nextjs_font/geist-mono-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'__nextjs-Geist';font-style:normal;font-weight:400 600;font-display:swap;src:url(/__nextjs_font/geist-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'__nextjs-Geist Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url(/__nextjs_font/geist-mono-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}</style></head><body><p>custom _document</p><div id="__next"><p>index page</p></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"development","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script><next-route-announcer><p aria-live="assertive" id="__next-route-announcer__" role="alert" style="border: 0px; clip: rect(0px, 0px, 0px, 0px); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; top: 0px; width: 1px; white-space: nowrap; overflow-wrap: normal;"></p></next-route-announcer><nextjs-portal></nextjs-portal></body>

undefined

  736 |
  737 |   if (hardError) {
> 738 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |           ^
  739 |   }
  740 |   return false
  741 | }

  at check (lib/next-test-utils.ts:738:11)
  at Object.<anonymous> (integration/app-document-remove-hmr/test/index.test.js:49:7)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev test/e2e/basepath/router-events.test.ts

  • basePath > should use urls with basepath in router events for failed route change
Expand output

● basePath › should use urls with basepath in router events for failed route change

assert.deepEqual(received, expected)

Expected value to deeply equal to:
  [["routeChangeStart", "/docs/error-route", {"shallow": false}], ["routeChangeError", "Failed to load static props", null, "/docs/error-route", {"shallow": false}]]
Received:
  null

Difference:

  Comparing two different types of values. Expected array but received null.

  115 |       await retry(async () => {
  116 |         const eventLog = await browser.eval('window._getEventLog()')
> 117 |         assert.deepEqual(eventLog, [
      |                ^
  118 |           ['routeChangeStart', `${basePath}/error-route`, { shallow: false }],
  119 |           [
  120 |             'routeChangeError',

  at deepEqual (e2e/basepath/router-events.test.ts:117:16)
  at retry (lib/next-test-utils.ts:811:14)
  at Object.<anonymous> (e2e/basepath/router-events.test.ts:115:7)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev test/e2e/app-dir/actions/app-action.test.ts

  • app-dir action handling > should forward action request to a worker that contains the action handler (node)
Expand output

● app-dir action handling › should forward action request to a worker that contains the action handler (node)

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#other-page')

  454 |   waitForElementByCss(selector: string, timeout = 10_000) {
  455 |     return this.startChain(async () => {
> 456 |       const el = await page.waitForSelector(selector, {
      |                             ^
  457 |         timeout,
  458 |         state: 'attached',
  459 |       })

  at waitForSelector (lib/browsers/playwright.ts:456:29)
  at e2e/app-dir/actions/app-action.test.ts:908:7
  at Proxy._chain (lib/browsers/playwright.ts:568:23)
  at Proxy._chain (lib/browsers/playwright.ts:549:17)
  at Proxy.startChain (lib/browsers/playwright.ts:455:17)
  at waitForElementByCss (e2e/app-dir/actions/app-action.test.ts:911:10)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev test/e2e/app-dir/actions/app-action-node-middleware.test.ts

  • app-dir action handling > should forward action request to a worker that contains the action handler (node)
Expand output

● app-dir action handling › should forward action request to a worker that contains the action handler (node)

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#other-page')

  454 |   waitForElementByCss(selector: string, timeout = 10_000) {
  455 |     return this.startChain(async () => {
> 456 |       const el = await page.waitForSelector(selector, {
      |                             ^
  457 |         timeout,
  458 |         state: 'attached',
  459 |       })

  at waitForSelector (lib/browsers/playwright.ts:456:29)
  at e2e/app-dir/actions/app-action.test.ts:908:7
  at Proxy._chain (lib/browsers/playwright.ts:568:23)
  at Proxy._chain (lib/browsers/playwright.ts:549:17)
  at Proxy.startChain (lib/browsers/playwright.ts:455:17)
  at waitForElementByCss (e2e/app-dir/actions/app-action.test.ts:911:10)

Read more about building and testing Next.js in contributing.md.

@wbinnssmith wbinnssmith force-pushed the wbinnssmith/biome-format branch 6 times, most recently from c997cd2 to e4b06e8 Compare May 16, 2025 02:45
@wbinnssmith wbinnssmith changed the title Format .jsx?, .tsx? with Biome Format JavaScript and TypeScript with Biome May 16, 2025
@wbinnssmith wbinnssmith force-pushed the wbinnssmith/biome-format branch from e4b06e8 to a82188f Compare May 16, 2025 02:50
@ijjk ijjk added Font (next/font) Related to Next.js Font Optimization. Rspack tests Turbopack Related to Turbopack with Next.js. type: next labels May 16, 2025
@wbinnssmith wbinnssmith marked this pull request as ready for review May 16, 2025 02:51
Copy link

vercel bot commented May 16, 2025

Notifying the following users due to files changed in this PR based on this repo's notify modifiers:

@timneutkens, @ijjk, @shuding, @huozhi:

packages/next/src/server/config.ts

@wbinnssmith wbinnssmith force-pushed the wbinnssmith/biome-format branch from 934d505 to 2e014f9 Compare May 16, 2025 03:03
@wbinnssmith wbinnssmith changed the title Format JavaScript and TypeScript with Biome Format JavaScript, TypeScript, and JSON with Biome May 16, 2025
@wbinnssmith wbinnssmith force-pushed the wbinnssmith/biome-format branch from 2e014f9 to 5a99673 Compare May 16, 2025 03:06
@wbinnssmith wbinnssmith marked this pull request as draft May 16, 2025 04:25
@wbinnssmith wbinnssmith force-pushed the wbinnssmith/biome-format branch from 5a99673 to fcec8a0 Compare May 16, 2025 05:00
wbinnssmith added a commit that referenced this pull request May 16, 2025
This extends #79251 to `examples/`. It also removes the custom prettier config for the `with-mantine` example and applies the standard examples formatting to it.
Copy link
Member Author

wbinnssmith commented May 16, 2025

wbinnssmith added a commit that referenced this pull request May 16, 2025
This extends #79251 to `examples/`. It also removes the custom prettier config for the `with-mantine` example and applies the standard examples formatting to it.
wbinnssmith added a commit that referenced this pull request May 16, 2025
This extends #79251 to `examples/`. It also removes the custom prettier config for the `with-mantine` example and applies the standard examples formatting to it.
wbinnssmith added a commit that referenced this pull request May 16, 2025
This extends #79251 to `examples/`. It also removes the custom prettier config for the `with-mantine` example and applies the standard examples formatting to it.
wbinnssmith added a commit that referenced this pull request May 16, 2025
This extends #79251 to `examples/`. It also removes the custom prettier config for the `with-mantine` example and applies the standard examples formatting to it.
This configures Biome to format all JavaScript and TypeScript code with a configuration that approximates our current prettier configuration.

There are some exceptions to minimize diff churn, each of which will be addressed in a followup PR. Prettier remains in place for these:

- `examples/`
- create-next-app template files
- Non-js/ts

Some files parse correctly with prettier but do not with Biome. They’re often test cases like `turbopack/crates/turbopack-tests/tests/snapshot/comptime/early-return/input/module.js`, so these are left ignored.
wbinnssmith added a commit that referenced this pull request May 16, 2025
This extends #79251 to `examples/`. It also removes the custom prettier config for the `with-mantine` example and applies the standard examples formatting to it.
wbinnssmith added a commit that referenced this pull request May 16, 2025
This extends #79251 to `examples/`. It also removes the custom prettier config for the `with-mantine` example and applies the standard examples formatting to it.
@wbinnssmith wbinnssmith force-pushed the wbinnssmith/biome-format branch from fcec8a0 to e59d9e9 Compare May 16, 2025 06:00
wbinnssmith added a commit that referenced this pull request May 16, 2025
This extends #79251 to `examples/`. It also removes the custom prettier config for the `with-mantine` example and applies the standard examples formatting to it.
wbinnssmith added a commit that referenced this pull request May 16, 2025
This extends #79251 to `examples/`. It also removes the custom prettier config for the `with-mantine` example and applies the standard examples formatting to it.
@wbinnssmith wbinnssmith force-pushed the wbinnssmith/biome-format branch from e59d9e9 to bd2cd68 Compare May 16, 2025 06:23
Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Veto until editor integration is clarified.

This requires the whole team to switch because Biome has different formatting rules. So we churn everybody (local good, CI fails) for what is a negligible gain. I never had any perceivable formatting issues locally.

@devjiwonchoi devjiwonchoi dismissed their stale review May 16, 2025 12:23

Need more discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
created-by: Turbopack team PRs by the Turbopack team. Font (next/font) Related to Next.js Font Optimization. Rspack tests Turbopack Related to Turbopack with Next.js. type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants