Skip to content

Unable to use registerCompletionHandler #3354

Closed Answered by novemberborn
mxiao-cll asked this question in Q&A
Discussion options

You must be logged in to vote

I think this part of your config resets AVA's knowledge of .mjs, making it use require() rather than import():

    "extensions": [
      "ts"
    ],

This should work:

    "extensions": {
      "mjs": true,
      "ts": "commonjs"
    },

(Or maybe you want module for ts, I'm not sure what the default is.)

Look for extensions in https://github.com/avajs/ava/blob/main/docs/06-configuration.md.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mxiao-cll
Comment options

Answer selected by mxiao-cll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #3350 on November 22, 2024 19:18.