Hello all,
A unit test framework is essential to our tooling, and one that is able to test Vue 3 components.
I’ve compared the following libraries (design page):
Comparison matrix:
Library | Acceptability | License | Module support | Mocking support | Typescript support | Github start |
---|---|---|---|---|---|---|
Vitest | default for Vue | MIT | yes | yes | yes | 10.4k |
Jest | no stable Javascript module support, but by far the most popular test library | MIT | experimental | yes | yes | |
Mocha | no mocking support | no | ||||
AVA | no mocking support | no | ||||
uvu | less popular, one person project | MIT | yes | yes | yes | |
Jasmine | no mocking support | no | 2.9k |
In conclusion, Vitest is the only library matching all our criteria.
Jest is a good candidate as it is very popular, but lack a stable module support, and is not providing a default support for components test.
uvu looks ok as well but is only supported by a single developer.
In conclusion, I suggest to select Vitest as our unit testing library.
WDYT?