How to resolve the bug of RangeError: Maximum call stack size exceeded on Angular Project

65 Views Asked by At
Env: 
"jest-preset-angular": "^12.2.3",
"jest": "^28.1.3", 
"@angular/core": "^14.2.12",

When I run jest:coverage ,result like this

it shows the package is es module, so I added the useESM config in jest.config.js file.

and run the jest file again result:

it shows RangeError: Maximum call stack size exceeded.

I am not sure it is the problem of uuid module or the wrong jest.config.

I also tried mock module uuid in jest file

and set mapping on moduleNameMapper , it runs same bug.

Does someone encounter issue like that?

0

There are 0 best solutions below