Jest testing a Node ES module that uses import.meta encounters SyntaxError: Cannot use 'import.meta' outside a module
.
This shows the issue using babel-jest, but a similar issue occurs using ts-jest.
npm test
encounters the error.
npm start
(tsc and run the output) does not.