我想编写一个单元测试来检查是否调用了一个函数,但是我得到了错误: submitDetails sendEmail:
AssertionError: expected sendEmail to have been called exactly once, but it was called 0 times 从我所看到的,我的函数submitDetails.submitDetails清楚地运行了函数sendEmail.sendEmail,但
我试图设置一个假的sinon服务器来测试一些请求。在下面的代码中,我的回调函数从未被调用过。Error: timeout of 500ms exceeded.Ensure the done() callback is being called in this test.测试错误为什么不立即调用回调函数?var request = require('request');
var sinon = re