How to run Jest tests sequentially?

Martin Konicek picture Martin Konicek · Sep 24, 2015 · Viewed 68k times · Source

I'm running Jest tests via npm test. Jest runs tests in parallel by default. Is there any way to make the tests run sequentially?

I have some tests calling third-party code that relies on changing the current working directory.

Answer

ncuillery picture ncuillery · Sep 24, 2015

CLI options are documented and also accessible by running the command jest --help.

You'll see the option you are looking for : --runInBand.