Looking at jest errors and loads of GitHub and StackOverflow issues, it's no surprise that people claim they don't like testing.

Maybe they would if we got our tooling right.

import { foo } from 'bar';

Nah, that's an unexpected token, jest does not like this syntax.

Using require, like in jest's getting started tutorial isn't compatible with my existing JS libraries exports.

Adding type: "module" in package.json just makes another error message appear instead.

Fucking developer experience!

Why bother with unit tests at all?

How come PHP is 10 years superior to JS when it comes to code quality, unit tests, and static code analysis?

I don't even care about "ES modules". I don't want to "mock" anything either. All I want to do is import a handful of JavaScript functions into another file.

Overengineered web dev stack sucks!

  • 0
    and I don't want to introduce Babel just for testings sake, as I already have esbuild to manage imports for elderly browsers and there is not TypeScript in the existing project but pure vanilla ES3/ES5 code (except for the import/export unluckily).
  • 1
    Do yourself a favour and stop using jest
    Vitest works with esm/ts out of the box and isn't slow as shit
  • 0
    That’s not overengineered. It’s just retarded.
Add Comment