Memory leak when conditionally stubbing fetch
I'm having an issue during a test using
@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: 
1 Reply
I am a fool... Missing await on db.execute in a middleware. C'est la vie :deno_it_works: