Run AVA tests with .js extensions as ES Modules

93 views Asked by At

I have a JavaScript project where the frontend uses ES Modules (built with babel / webpack) and the backend uses CommonJS modules. All files use the .js extension. Given this mix and the file extension convention, I can't set "type": "module" in my project's package.json.

I'm using AVA to run unit tests across the frontend and backend. Is there a way to run the frontend tests as ES Modules and the backend tests as CommonJS modules?

0

There are 0 answers