Memory leak when conditionally stubbing fetch
I'm having an issue during a test using
I wondered if any smarter people have experienced this before or have any answers as to why this specific behaviour is arising.
Error:
@std/testing/mock where I want to stub fetch for only a specific URL (an OAuth token exchange endpoint) receiving a mocked response in this case. For all other fetches, I want the fetch to behave normally. Everything seems to be functional however the test is failing due to fetchCancelHandles not being cleared up but I really can't see how this could happen as all requests made have their bodies consumed.I wondered if any smarter people have experienced this before or have any answers as to why this specific behaviour is arising.
Error:

