next-page-tester / next-page-tester

DEPRECATED - DOM integration testing for Next.js
MIT License
622 stars 28 forks source link

next image config moved in v12.1.1+ #298

Closed florian-milky closed 2 years ago

florian-milky commented 2 years ago

🐛 Bug Report

image config import moved in next: https://github.com/vercel/next.js/pull/34677/files packages/next/shared/lib/image-config.ts

jasonwilliams commented 2 years ago

@florian-milky are you able to help us by doing a PR for this change? We're low on contributors right now and would appreciate it.

Zach-Jaensch commented 2 years ago

If I get time do you mind if I look at creating a PR?

In the mean time to help others until the fix can be released, in your jest config add the following:

{
  "moduleNameMapper": {
    "next/dist/server/image-config": "<rootDir>/node_modules/next/dist/shared/lib/image-config"
  }
}
jasonwilliams commented 2 years ago

If I get time do you mind if I look at creating a PR?

Sure, I’ve assigned this to you @Zach-Jaensch

paul-pro commented 2 years ago

@Zach-Jaensch @jasonwilliams sorry, it was a oneliner to fix so I've opened a PR. Please take a look