我正在使用 WebStorm 2019.2、Angular 8 和最新的 nrwl monorepo。开始 Angular 测试时ng test <app-name>
一切正常。如果我尝试从 WebStorm 中运行测试(通过单击编辑器中的绿色三角形),我会收到以下错误:
Error: Failed: "Zone is needed for the async() test helper but could not be found.
Please make sure that your environment includes zone.js/dist/zone.js"
我尝试了几个小时的谷歌搜索以找到解决该问题的方法,但没有成功。知道如何解决这个问题吗?
PS:monorepo 还托管了一个 NestJS 服务器。在 WebStorm 中运行单个测试适用于 NestJS 应用程序。