Fork me on GitHub
#shadow-cljs
<
2024-06-21
>
hifumi12307:06:01
replied to a thread:

Overall, the :target :esm-files output seems to not give any issues for me on a codebase with dozens of test namespaces The only thing to be mindful of is that vitest sees the world differently compared to shadow with :target :browser. e.g. it always wants ESM distributions of all packages, so you may need to be careful in how you consume some NPM deps in CLJS code. However, if you already use :target :esm and process the output with Vite, then vitest "just works" out of the box and needs little more than specifying a pattern of test files. If you are testing React components and made extensive use of browser APIs that don't exist in JSDOM, then you will absolutely run into trouble, but that is no longer a Shadow CLJS issue.