Recently upgraded to angular 11 and stumbled upon an issue during running npm test in my gitlab pipeline, the issue is only when running npm test, npm build prod seems to work fine.
Below information about the env.
Deploy image has Node 14 LTS
angular CLI: 11.0.5
Target:es5
I've tried to run ng test with more memory, it didn't help
node --max_old_space_size=5000 ./node_modules/@angular/cli/bin/ng test --code-coverage
noticed when changing the target to es2015 or es6 npm test seems to work, but I don't want to make this change is causing some other functionality to break in my application.
Here's a screenshot of the error:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…