Had the same issue and almost gave up using Mocha with TypeScript (in our case Angular 9).
This is what helped me:
In tsconfig.json
:
Replaced this:
"module": "esnext",
with this:
"module": "commonjs",
Also here I found a working example of Mocha with TypeScript and used the tsconfig
file from there to compare with mine:
https://medium.com/@RupaniChirag/writing-unit-tests-in-typescript-d4719b8a0a40