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.
我正在尝试针对一个 nock 范围运行多个断言并在 beforeEach 中模拟请求,但是scope.pendingMocks()即使在我用以下方法清理了所有请求之后,我仍然看到了请求:
scope.pendingMocks()
afterEach(() => { nock.cleanAll(); });
在具有多个请求的同一主机上设置模拟并在每个测试中新断言请求的最佳方法是什么?