-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle compilation/bundle step #2589
Comments
The infrastructure we use for How would you select a test file from inside the bundle though? If you precompile AVA can load ESM test files though. #2347 (comment) shows how you could do it on the fly with FWIW in my TypeScript projects, running a separate |
I never tried. I suppose if the bundle is set up to have multiple outputs AVA would still see each test file.
I'll try replacing refined-github/refined-github#3206 with that solution perhaps, but with all those experimental flags it looks like a time bomb :(
Can you point me to one such example? I'd like to see how you're configuring the built folder |
Test file selection is driven by the file system. What the TypeScript provider does is provide a way to map that to a different file at runtime. Presumably we could select a bundle entrypoint or something like that.
I think from AVA's side it'll be OK — you're really dependent on the behavior in Node.js.
Have a look at https://github.com/avajs/cooperate. |
Closing because those issues have since been resolved (refined-github/refined-github#4002 and vadimdemedes/dom-chef#86) and I started using Vitest where I want to avoid ESM issues |
Recently I found myself having to bundle the tests to overcome all the hurdles caused by combinations of AVA, TypeScript and
type: "module"
(vadimdemedes/dom-chef#68 and refined-github/refined-github#3206), so having AVA support some kind of build step might be helpful.Advantages over
rollup && ava
ava
without having to run an npm script firstava --watch
would trigger the build as wellAdditionally, it could automatically handle the creation of a temporary build folder
Additional advantages
The text was updated successfully, but these errors were encountered: