it-at-m / refarch-templates

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

[Feature] Add vue-testing-library as wrapper to vue-test-utils #495

Open devtobi opened 1 week ago

devtobi commented 1 week ago

Relevant template

refarch-frontend, refarch-webcomponent

Problem description (optional)

Testing with vue-test-utils can often be cumbersome and complex. On top of that, it does not test components from the user perspective but from the developer perspective by testing things like props, event invocation, computation of internal properties and so on. Vue Testing Library allows to write tests for Vue Components that resemble the usage of the component from a user perspective and thus hides implementation details of Vue specific patterns and concepts. See https://testing-library.com/docs/vue-testing-library/intro for more information.

Desired solution

Add vue-testing-library to improve testing capabilities and write an example test which uses this new pattern.

Considered alternatives (optional)

Additional context (optional)

No response

No duplicate

Code of Conduct