quasar-template-default icon indicating copy to clipboard operation
quasar-template-default copied to clipboard

Feature request: unit & e2e test config.

Open musicformellons opened this issue 7 years ago • 11 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.

musicformellons avatar Dec 02 '16 17:12 musicformellons

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

musicformellons avatar Dec 14 '16 10:12 musicformellons

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 avatar Dec 14 '16 10:12 rstoenescu

@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 :)

jonafrankbrimma avatar Feb 26 '17 04:02 jonafrankbrimma

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! :)

micheleangioni avatar Aug 14 '17 14:08 micheleangioni

Yes, of course. I know Vue team is working on an official testing lib/setup. Will probably wait for that before proceeding.

rstoenescu avatar Aug 14 '17 14:08 rstoenescu

Wow great, that would really easy things! :)

micheleangioni avatar Aug 14 '17 14:08 micheleangioni

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 avatar Oct 12 '17 14:10 pinghe

@pinghe yeah I have taken a look at it too, it's really well done!

micheleangioni avatar Oct 13 '17 08:10 micheleangioni

@rstoenescu How about integrating this?

musicformellons avatar Nov 07 '17 19:11 musicformellons

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)

manelclos avatar Dec 15 '17 13:12 manelclos

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"

Arushi-Jain avatar May 01 '18 11:05 Arushi-Jain