在我的测试传奇中,我有这样的东西
expect(submitFeedbackSagaClone.next().value).toEqual(
call(notify.createShowQueue(), "Thank you",
"success"));
根据结果,我得到类似的一切
Expected value to equal:
{"@@redux-saga/IO": true, "CALL": {"args": ["Thank you", "success"], "context": null, "fn": [Function
mockConstructor]}}
Received:
{"@@redux-saga/IO": true, "CALL": {"args": ["Thank you", "success"], "context": null, "fn": [Function
mockConstructor]}}
在生成器函数中,我试图测试这段代码
yield call(notify.createShowQueue(), "Thank you for your feedback", "success");
我看到两个结果都相似,但是测试用例失败了,“比较值没有视觉差异”。我一般如何测试这类测试用例。