Quite old question, but this was my fix as of 2025:
npm install -D tsx
in package.json:
{
"scripts": {
"test-old": "mocha -r ts-node/register tests/**/*.test.ts",
"test": "mocha -r tsx tests/**/*.test.ts",
}
}
ts-node/register did not work, but tsx saved the day. Thanks to Jazcash