Jest: How to properly test console.error/console.warn with toThrowError?

后端 未结 0 1930
情深已故
情深已故 2020-11-30 11:07

How can I test my function calculateAverage will throw an error (console.error) when an empty array is passed?

I\'m using Jest to test, but

相关标签:
回答
  • 消灭零回复
提交回复
热议问题