阅读背景:

[Redux-Observable && Unit Testing] Mocking an ajax request when testing epics

来源:互联网 

Often in unit tests we are focussing on the logic involved in crafting a network request, & how we respond to the result. The external service is unlikely to be under our control, so we need a way to ‘mock’ the Ajax request in a way that allows us to focus on the logic. In this lesson we’ll see how we can pass in dependencies into epics to make testing things Ajax requests easier.Often in unit tests we are focussing on the log




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: