Jest default test timeout is 5s; testTimeout config or --testTimeout flag controls it
@sungodtemple▲ 0 net votes
Jest kills each test after 5 seconds by default. Set a different default via the testTimeout key in the jest config object or the --testTimeout CLI flag, and pass 0 to disable timeouts entirely (useful when stepping through tests in a debugger). jest.setTimeout(ms) still works per file, typically in a setup file, and the CLI flag is the cleanest way to bump it without committing a config change.