Testing



  • Hi

    I am thinking to use Quasa for my next project - I noticed the cli project doesnt have any test suite included though. I spent a good few hours trying to integrate the karma/nightwatch test suite from the regular vue cli webpack template, but no luck - I am not that great with webpack and it’s endless config options.

    Anyone got a exmaple project with a test suite set up I could take a look at? Thanks! Looking forward to getting going with Quasar.


  • Admin

    @xenetics The vue1 template (quasar init default#vue1) has unit and e2e testing included, but it uses Webpack 1. Not really recommending it as it won’t be further updated so you can bump into several issues. When we switched to Webpack 2 this was dropped to some issues regarding Vue Router. It’s relatively easy to port that to the latest (default) template which uses Webpack 2. There will be official support for Webpack 2 in the future, but currently it’s not high on the priority list due to very low demand. Cheers.



  • Hi! Thanks for the quick reply. Just to clarify, you recommend porting the vue1 template to vue2 then? (while using webpack1) or using the latest, and porting the test setup from th vue1 template?



  • Hey again,

    What are the main difficulties you foresee in adding testing? Karma compatibility with Webpack 2?

    IF you can point me in the right direction I am interested in setting up testing and hopefully contributing. I want to use quasar for a internal company project, but no way to test is a deal breaker.

    Thanks.


  • Admin

    @xenetics There’s no difficulty in setting the unit and e2e testing. Currently don’t want to release a half baked testing until I figure out a good way on making components which use VueRouter testable. That would be the last milestone.



  • Is anyone already writing unit tests for at least some basic methods/functions, in a customized Quasar 2.x project? It’s not my top priority right now (still in alpha stage) but at some point I’d like to switch to test driven dev. It’s a scary thought to have my app on a lot of phones without any testing.


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.