扑来,在一起运行时的测试失败,但在不断运行时通过
我一直在我的API上进行扑动单元测试,但遇到了一个问题。
我嘲笑了一个HTTP客户端来测试所有帖子,获取,删除和补丁请求。问题在于,当我将所有测试一起运行时,帖子请求和补丁请求的某些测试失败(通常是在通过帖子或补丁请求进行测试之后),但是当我运行它们时, ,他们通过。
我遇到的错误是:不良状态:
如果有人遇到了类似的问题并找到了解决方案,我会很乐意接受它
。 ,祝大家有美好的一天!
I've been working on flutter unit testing on my API but I encountered a problem.
I've mocked an HTTP client to test all the POST, GET, DELETE, and PATCH requests. The problem is that when I run all my tests together, some tests on POST and PATCH requests fail (often after a test on a POST or PATCH request that passes) but when I run them individually, they pass.
The error I face is: Bad state: Cannot call when within a stub response
If anyone has encountered a similar problem and found a solution I would gladly take it :)
Thanks in advance for your time on my problem, I wish you all a good day!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论