{ Object.setPrototypeOf(this, CustomError.prototype);} }并尝试在我正在测试的函数中使用该属性(在本例中是写入控制台),我的测试失败了,因为抛出了一个TypeError -堆栈跟踪如下:
Expectedfunction to throw AuthError, but it threw <e
在运行角单元测试时,使用chrome浏览器,最终导致错误为 at _isAndroid (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/forms/fesm2015/forms.mjs:176:43)at new DefaultValueAccessor