Open nothingismagick opened 6 years ago
In order to download testing dependencies along with the quasar template, I forked the quasar-starter-kit and changed the package.json. It downloads only the dependencies for unit test for now only when the user says yes to the question asked (edit meta.js to change the questions asked). Quasar-cli is needed only to create the folder for those tests, for now I create the folder myself for unit testing while the dependencies are downloaded only i choose to.
Regarding your comment in general, we have moved to babel7 and webpack4 - your package.json shows that your source is not up to date with quasar 0.16.1...
But this approach will even work, we are just creating our own template using quasar-starter-kit . with quasar 0.16.1 we may have to change the version of the webpack loaders in webpack.test.config.js
Yes, your approach would theoretically work, but the thing is that we want to centrally manage the packages installed for the various test runners. We are not merely offering mocha-webpack. Further, this approach does not hook into the webpack chain of quasar 16+ - which in my opinion is the only reason to use mocha webpack. Otherwise just use jest or Ava...
For your information, I was also able to integrate mocha-webpack into quasar 15, it is Babel and the new webpack approach that makes it challenging with 16.
Thank you for your insights, I will definitely look into it.
why use mocha instead of jest?
Jest is very strong supported by facebook, we will need jest snapshot & image snapshot to get pixel perfect test for UI.
This RFC is about enabling the installation and integration of unit test-runners, e2e frameworks and quality control into the Quasar Framework. It is not a discussion about "if we should do this", but rather a discussion about the approach. After meeting with several contributors helping to scaffold the testing mode, our current opinion about how the flow should work is as follows:
quasar init mypackage
quasar-cli
quasar-cli
adds themypackage/test
folder, installs the base@quasar-test/base
repo@quasar-test/ava
,@quasar-test/cypress
,@quasar-test/lighthouse
)mypackage/test
folder.mypackage/package.json
is updated with configs for the test runners.mypackage/package.json
, so that the user can run tests with yarn/npm.mypackage/quasar.conf.js
mypackage/.babelrc
is updated accordinglyquasar mode
:The monorepo is under construction here:
Test runners currently verified to have valid "integration" at the moment are checked off in the following list:
UNIT
E2E
QUALITY
List of known javascript unit-testing frameworks this comment will be updated as more land
Matching Quasar Cli RFC regarding
quasar test
quasarframework/quasar-cli/issues/127