I write stuff in TypeScript and used Tape as a test runner. After converting my project to use ECMAScript modules (ESM), tape stopped working, causing quite a bit of headache.
- Write tests in TypeScript. Tests live next to source files.
- Do not compile tests to the dist directory.
- Use ts-node to transpile tests on the fly and use tape as the test runner.