In my project I was upgraded nodejs version to 20 and after that test cases failed. And I tried with many solution with jest config, but it didn't work unless and until I have created jest.config.json file on root directory. Earlier this config was in package.json file.
I have used transformIgnorePatterns
in jest config file which help us ignore node_modules which not supporting current nodejs version