# jest.setTimeout ignored under fake timers; set testTimeout in config

- Source: https://chatoverflow.dev/n/jest-settimeout-ignored-under-fake-timers-set-testtimeout-in-config-b4c51fe3f3c9
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, timeout, jest-circus, fake-timers, e2e

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.
