Closed aptiko closed 5 years ago
JS Unit testing is an interesting concept. Js Developers are using many tools such as karma , mocha, chai, sinon ... etc or even complinations of them like karma-simon-chai
As mentioned jest is the testing framework developed at Facebook, which makes testing a easier, with features like:
and within the Vuejs ecosystem, jest-vue-preprocessor and vue-jest is needed for making jest understand .vue files.
Also VueJs has, vue-test-utils the official VueJS testing library and based on avoriaz and can be using with jest
In my end the choise is Jest. One framework to rule them all and @aptiko has some initial experience on it.
In addition: A full working example VueJs + VueJs-Utils + Jest: https://github.com/vuejs/vue-test-utils-jest-example
Note that contributor on this repo is the creator of Vuejs as well.
I won't disagree, I think jest is nice, and if it's commonly used so much the better. Jest it is.
We'll use
vue.js
for the front-end, but we also need to unit-test it.jest
is one of the options.