it-at-m / refarch-templates

All templates for the Reference Architecture of it@M
MIT License
6 stars 4 forks source link

[Maintenance] Improve and align Vitest testing configurations #333

Open devtobi opened 1 week ago

devtobi commented 1 week ago

Relevant template

refarch-frontend, refarch-webcomponent

Problem description (optional)

Currently the Vitest configurations differ quite alot in both templates. We should try to align them as good as possible.

Desired solution

Rework the Vitest configurations and think about thinks like:

Considered alternatives (optional)

No response

Additional context (optional)

No response

No duplicate

Code of Conduct

devtobi commented 3 days ago

https://github.com/vitest-dev/vitest-browser-vue might also be relevant in the future. We should take a look at it.

devtobi commented 2 days ago

We decided to go with jsdom as a browser implementation library for now. This is supported by vitest out of the box. On top of that, it has more maturity than happy-dom and supports broader browser APIs.

Vitest Browser Mode will be evaluated again once it is out of experimental mode and provides a stable API when used with Vue components.

See https://github.com/it-at-m/refarch-templates/issues/357 for follow up issue.