Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我正在编写的应用程序中,我们可能会在 UI 中执行某些操作时触发超过 1 个请求(基于一些先决条件)。我试图在测试中写这个,但我发现很难模拟请求:如果请求被多次触发,我每次都会得到:
Error: Unexpected request: PUT my/test/url No more request expected
有没有办法让模拟的 httpbackend 多次响应请求?(有点像您可以在 Mockito 中声明该操作应在模拟上执行多少次)