-
Notifications
You must be signed in to change notification settings - Fork 146
AVA tests are broken after v0.19.2 for default exports #240
Comments
Hi @Lichtjaeger! Thanks for the repro!
or long form
Then your tests will work properly. Update: I added the |
Is it possible to limit this behavior only to AVA? I would like to use esm in my source files the most native way. For example, if I use the "cjs" option it will be possible to use |
It will be in the next release of AVA. They will make it so that when you use |
Thanks a lot. Sounds great. |
I can confirm: it works with the "cjs" option. |
Oh hey, you can also use the option: "@std/esm": {
"cjs": {
"interop": true
}
} to just get the Babel CJS compat. |
Nice. Do you also know how to make this work with wallaby.js? |
I've asked at wallabyjs/public#1468. |
Added the |
Thank you @ArtemGovorov! |
In addition to #233.
If I use the import statement for default exports with mjs files (
import <packagename> from '<filename>.mjs'
) it results in an object with a "default" property.This "default" property contains the real default export. This is also true for imports like
import { default as <packagename> } from '<filename>.mjs'
.Here a ZIP file with a small test project.
Named exports do work.
The text was updated successfully, but these errors were encountered: