Feature request: unit & e2e test config.
musicformellons opened this issue · comments
This a feature request. It used to be included in quasar (like the vue boilerplate). As I remember it, it used to work for my setup, but somehow probably because of npm package updates I now get all kinds of errors which I can not seem to get rid of.
These might be helpful for getting things working with webpack 2:
https://cafedev.org/article/2016/12/testing-with-wepack-2-inject-loader-karma-mocha-chai-and-sinon/?utm_source=javascriptweekly&utm_medium=email
http://forum.quasar-framework.org/topic/101/testing-in-version-0-9-1/15
Yeah, don't have an issue with setting up the test environment. I got a big issue with testing with Vue Router. Thanks for sharing anyway!
@rstoenescu any timeline for the integration :) ? A lot of us are waiting for this ... A timeline for this will be very useful . Thanks in advance :)
Hi @rstoenescu ,
I'm having issues in reproducing the testing environment of vue-cli's webpack template into Quasar.
I know you are now busy with the next stable 0.14 version (great stuff there, really looking forward it!), but could you please consider giving testing configuration some priority afterwards?
Thanks! :)
Yes, of course. I know Vue team is working on an official testing lib/setup. Will probably wait for that before proceeding.
Wow great, that would really easy things! :)
vue-test-utils is the official test library for Vue.js :
https://github.com/vuejs/vue-test-utils
https://vue-test-utils.vuejs.org/en/
https://github.com/vuejs/vue-test-utils-mocha-webpack-example
@pinghe yeah I have taken a look at it too, it's really well done!
@rstoenescu How about integrating this?
Hi, webpack template for vuejs has 5K5 stars (https://github.com/vuejs-templates/webpack). Why not base quasar template on it? looks like a lot of duplicated effort. I tried to setup jest testing using forum instructions and failed. I tried copying the nightwatch config from vuejs-webpack to a quasar project and failed too (e2e runner expecting a Promise, but build/webpack.dev.conf.js is missing that part)
Try using this template for your code https://github.com/Arushi-Jain/quasar-starter-kit for unit testing using mocha and chai, you just need to use "npm run test"