Javascript – Can I test fetch timeout using Jest?
node: 20.15.1 jest: 29.7.0 jest-environment-jsdom: 29.7.0 const response = await fetch(url, { signal: AbortSignal.timeout(5000) }); I want to unit test the above line of javascript using Jest. Specifically the timeout behaviour. But is that actually possible? No matter what I…