You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.
This RFC is about integrating a new mode into quasar-cli for scaffolding test runners and actually running tests with the quasar test command.
Goals
The goal of the new mode is to make it dead-simple to integrate the testing framework of the user's choice into their new or existing quasar-framework project. The most time-consuming part of rigging test runners is their configuration, and that is where we hope to relieve the development team.
The testing approach needs to be simple enough for a beginner to understand and use, yet powerful enough to enable requirements-based testing, node api hooks and continuous integration without convoluted and potentially breaking changes to a working quasar project or its babel / webpack configuration. We should offer a "recommended" approach with sensible defaults, but enable professional developers the opportunity to pick and choose test-runners that they are more comfortable with.
To that end, we need to make as many test runners available as possible, while considering the fact that different projects and teams have different needs. At the very least, it must be possible using some combination of test runners to achieve passing unit tests that dive into the <template>, the <script> and produce accurate coverage approaching ~99% without actively ignoring parts of the pre-babel'd code base. Further, e2e / integration tests must enable the developer to gain insight into the built project, whether that is on a quasar dev server, a cordova emulator or even an electron package. Finally, in the interests of code quality, it is desirable to inspect both the final results with e.g. Lighthouse and code bloat via profiling with e.g. the import-cost node package.
Requirements
The "test mode" must:
be optional
available for integration during quasar init
available for integration at any point after quasar init
be non-destructively removable
automatically added if the user runs quasar dev -m test
configurable according to user preferences for test runner frameworks
reconfigurable if the currently selected runner/s should be changed
update-able from userland (yarn update) as well as with new versions of quasar-cli
chainable in order to have any combination of unit, e2e and quality run
be delivered with at least one passing test that is integrated with both Vue and Quasar
There must be "test runners" available for:
spa / pwa
electron
cordova
The "test mode" should:
run within a webpack context, i.e. quasar dev test (not possible e.g. with lighthouse)
run outside of webpack, i.e. quasar test
run as npm/yarn commands, i.e. yarn test:e2e
enable parallel execution of e.g. quasar dev in one console and ava --watch in another
be scriptable and extendable from userland
make snapshots available where possible
centralise all test configs and settings in the project's package.json
The "documentation" will:
describe testing in general
have a quick start section describing the folder structure and available commands
have a basic info page for each of unit, e2e and quality tests
have a detailed page for each test runner, including its configs, settings and files
have a troubleshooting page
be available through the general documentation, but hosted in the monorepo
This RFC is about integrating a new mode into
quasar-cli
for scaffolding test runners and actually running tests with thequasar test
command.Goals
The goal of the new mode is to make it dead-simple to integrate the testing framework of the user's choice into their new or existing quasar-framework project. The most time-consuming part of rigging test runners is their configuration, and that is where we hope to relieve the development team.
The testing approach needs to be simple enough for a beginner to understand and use, yet powerful enough to enable requirements-based testing, node api hooks and continuous integration without convoluted and potentially breaking changes to a working quasar project or its babel / webpack configuration. We should offer a "recommended" approach with sensible defaults, but enable professional developers the opportunity to pick and choose test-runners that they are more comfortable with.
To that end, we need to make as many test runners available as possible, while considering the fact that different projects and teams have different needs. At the very least, it must be possible using some combination of test runners to achieve passing unit tests that dive into the
<template>
, the<script>
and produce accurate coverage approaching ~99% without actively ignoring parts of the pre-babel'd code base. Further, e2e / integration tests must enable the developer to gain insight into the built project, whether that is on aquasar dev
server, a cordova emulator or even an electron package. Finally, in the interests of code quality, it is desirable to inspect both the final results with e.g. Lighthouse and code bloat via profiling with e.g. the import-cost node package.Requirements
The "test mode" must:
quasar init
quasar init
quasar dev -m test
There must be "test runners" available for:
The "test mode" should:
quasar dev test
(not possible e.g. with lighthouse)quasar test
yarn test:e2e
quasar dev
in one console andava --watch
in anotherThe "documentation" will:
Link to new monorepo: https://github.com/quasarframework/quasar-test
Matching Quasar Starter Kit RFC regarding
quasar init
quasarframework/quasar-starter-kit/issues/43
The text was updated successfully, but these errors were encountered: