Mocha fails to use typescript baseUrl setting for ESM imports
I’m trying to get “absolute” import paths working in our mocha test files. These work fine for our Vite/TS React app.
Exception during run: Error [ERR_MODULE_NOT_FOUND]: Cannot find module when using mocha to do unit test
I am trying to use mocha "mocha": "^10.4.0"
to do a unit test, this is the test file test/util.test.mjs
look like: