Search code examples
angularunit-testing

I'm getting the following deprecation warning when running unit tests in a brand new Angular 11 application:


enter image description here

This is the error that I was getting

Unit Testing (This type of error occurs when I run ng test)


Solution

  • This error is coming from karma (it uses log4js under the hood). The solution is to update karma to at least ^6.3.12. as found here: log4js-node-DEP0004 - Deprecation warning in Angular 12 karma unit tests