我是 node.js 新手,在为预期会抛出错误的函数设置简单单元测试时遇到了问题。我的函数非常简单:const which_min = function(array) {var lowest = 0;for (var i = 1; i < array.length; i++) {if (array[i] < array[lowest]) lowest = i;}return lowest;}我想测
2020-06-25
我有一个针对 Enzyme/mocha/chai 的简单测试,想让它通过。错误如下: 1) <PostList /> should have a container for holding posts:TypeError: Cannot read property 'length' of undefinedat PostList.render (D:/mydocs/webdev/gitprojs