Removes handlers added during a test with
server.use() and keeps the initial handlers passed to setupServerIt removes handlers added during a test with server.use(), and keeps the first handlers passed to setupServer. Tests use server.use(...) to override a response, for example to simulate a 500 error. resetHandlers() drops those overrides, so they don't leak into the next test.
It does not "stop intercepting requests". That is the job of server.close() in afterAll.
Read more