简体   繁体   English

在全新的 Angular 11 应用程序中运行单元测试时,我收到以下弃用警告:

[英]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)单元测试(当我运行 ng 测试时出现这种类型的错误)

This error is coming from karma (it uses log4js under the hood).这个错误来自karma (它在后台使用log4js )。 The solution is to update karma to at least ^6.3.12.解决办法是更新karma至少到^6.3.12. as found here: log4js-node-DEP0004 - Deprecation warning in Angular 12 karma unit tests如下所示: log4js-node-DEP0004 - Angular 12 业力单元测试中的弃用警告

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WEBPACK 弃用数组以在 angular 11 中使用 web 包 5 设置警告 - WEBPACK deprecation array to set warning in angular 11 using web pack 5 Angular 运行 Karma 测试时未加载(按照教程) - Angular not loading when running Karma tests (following a tutorial) Angular:如何在运行 Git 推送时强制运行单元测试? - Angular: How to force run unit tests when running Git push? 当我尝试创建一个新的 angular 项目时出现以下错误 - I am getting following error when I try to create a new angular project Angular Karma没有运行所有单元测试 - Angular Karma not running all unit tests 使用Jasmine运行angular2单元测试时在调用服务时出错 - getting error in calling a service while running angular2 unit tests with jasmine IE11 - 运行angular TestCafe测试时的SecurityError zone.js - IE11 - SecurityError zone.js when running angular TestCafe tests 在 angular + jest 中运行单元测试时如何正确模拟库“Twemoji”? - How to correctly mock the library “Twemoji” when running unit tests in angular + jest? Angular 12 在运行未找到测试时使用 JEST 设置单元测试 - Angular 12 setting up Unit test with JEST when running no tests found 运行ng serve时出现以下错误 - I am getting following error when running ng serve
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM