Artemko
1 min readAug 3, 2020

--

Jest is bad. It is bad not only as testing framework but as a utility in general.

Jest will make you hate testing if only you aren’t React developer and you do use conveniently npx-created test suites for your components. Otherwise — it’s a pain in the butt.

  1. Jest configs can‘t be written in TS (at the moment)
  2. Jest doesn’t support “root hooks“ to setup the environment for all test suits. A type of hooks before (or after) every test in every file. Instead, you are forced to use some crappy jest-environment-node module with an awkward configuration process.
  3. That custom environment config you can’t write in TS also
  4. You can’t simply export global variables for all test suites (see #2)
  5. Jest doesn’t know how to handle arguments for scripts (crucial for integration tests, that’s just ridiculous)
  6. Jest cannot nest the test suits inside each other.
  7. Jest starts and generally runs slower than other testing frameworks.
  8. Jest configs can’t be written as ES6 modules without third-party tools (babel, etc.)

But all that you can’t do with Jest you can do with Mocha. I see no reasons to migrate to Jest while Mocha does everything better.

--

--