Ok, f jest. I'm porting to a different testing framework. This is a disaster (see also previous toots). For some reason it wants to parse the source (why!?) and then chokes on node-fetch (why!?). I tried all the solutions I found online, none changed anything.

What minimal testing framework that supports async and hooks before/after each test would you recommend? #JavaScript in #NodeJS, not in browser.

Ok, before I rewrite all the tests (a major undertaking) I tried some more today, and with this configuration I managed to get it to work. ts-jest did not work.

I have this in package.json:
"type": "commonjs",

#jest #TypeScript #commonjs

Oh and I had to install these packages:

"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.29.0",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/plugin-transform-modules-commonjs": "^7.28.6",
"@babel/preset-typescript": "^7.28.5",