Unverified Commit 53bc5b3d authored by Steven's avatar Steven Committed by GitHub

Fix `next/jest` when testing `next/future/image` (#38569)

- Fixes #38383 
- Similar to a previous fix in #26502 
parent 62f3f878
......@@ -301,7 +301,7 @@ export default function Image({
blurDataURL,
...all
}: ImageProps) {
if (!experimentalFuture) {
if (!experimentalFuture && process.env.NODE_ENV !== 'test') {
throw new Error(
`The "next/future/image" component is experimental and may be subject to breaking changes. To enable this experiment, please include \`experimental: { images: { allowFutureImage: true } }\` in your next.config.js file.`
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment