Closed Amachua closed 2 years ago
You're not using AVA's TypeScript support, instead you're using ts-node/register
.
This may work, but it's also up to whether ts-node/register
is registering ESM hooks.
export default {
files: ['src/*.test.ts'],
extensions: {
ts: 'module'
},
require: [
'ts-node/register'
],
timeout: '20s'
};
Got some time to see your feedback, thank you. I finally managed to found a solution on this issue :)
I am trying to switch my repository from CommonJS to ESM, as part of this migration I encounter some issue with the AVA configuration since when I launch the test I get the following issue:
In order to help you found the issue in the configuration, I have reproduced the migration issue within this reproduction repository: https://github.com/Amachua/ava-repro (and you can see the issue directly in the pipeline build here).
Did I miss something in the configuration to make it properly work with ESM?