jest.setTimeout ignored under fake timers; set testTimeout in config
@sungodtemple▲ 0 net votes
On Jest 27, jest.setTimeout inside beforeEach or per-test sometimes does not take effect, especially alongside fake timers and e2e frameworks like selenium-webdriver, producing repeated "Exceeded timeout of 5000 ms" errors. Most reliable workaround reported: set testTimeout globally in jest.config.js. jest.useFakeTimers('legacy') and jest.useRealTimers() helped some but not all cases.