# quasar-testing
**Repository Path**: lemon_engine/quasar-testing
## Basic Information
- **Project Name**: quasar-testing
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-04-29
- **Last Updated**: 2021-05-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
REMEMBER
Test the functionality, not the function
## Table of contents
- [Donations](#donations)
- [Installation](#installation)
- [Removal](#removal)
- [Reset](#reset)
- [Upgrade](#upgrade)
- Provided App Extensions
- [Testing Harnesses Manager](packages/testing/README.md)
- Unit testing
- [Jest](packages/unit-jest/README.md)
- [Ava](#ava) (**not up to date**)
- E2E testing
- [Cypress](packages/e2e-cypress/README.md)
- [WebDriver.io](#webdriverio-wdio) (**not up to date, WIP**)
- [Quality Auditing](#quality-auditing) (**not up to date**)
- [Roadmap](#roadmap)
- [Contributing](#contributing)
- [License](#license)
## Donations
The Quasar team spend a considerabile amount of time studying, coding and maintaining App Extensions which save literally thousands of developers hours, days or weeks of work.
Does your business or personal projects depend on these App Extensions? How much time did we save you until now? Consider [donating](https://github.com/sponsors/rstoenescu) to help us maintain them and allow us to create new ones!
## Installation
You can add test harnesses:
- in a centralized way via the [Testing Harnesses Manager](packages/testing/README.md);
- using an "a-la-carte" approach, checking each harness documentation.
You can add multiple harnesses and even use them into your continuous integration pipelines.
## Removal
You can remove a testing harness running:
```shell
$ quasar ext remove @quasar/testing-unit-jest
```
This will remove the associated NPM package and run the Quasar App Extensions uninstall hook.
If not done into the AE uninstall hook, the removal won't delete test or configuration files.
## Reset
If you mess up your configuration and need to reset, or just want to check out if there has been any changes into new versions configuration, you should run:
```shell
$ quasar ext add @quasar/testing-unit-jest
```
Be careful though, this will overwrite ALL existing files (including configurations) if you allow it to. Make sure to have some kind of version control in place before proceeding. This operation will also upgrade the NPM package and its dependencies.
To prevent installing new or updated dependencies, you should run:
```shell
$ quasar ext invoke @quasar/testing-unit-jest
```
## Upgrade
You can upgrade a testing harness and its dependencies by updating its related NPM package.
```
$ yarn add -D @quasar/quasar-app-extension-testing-unit-jest
```
This won't change existing test or configuration files.
### Upgrade to a new major version with NPM
When upgrading between major versions, since there are major changes, we suggest you to remove and re-add the AE, to obtain lastest configuration files too.
Ensure your source control is clean before proceeding, then answer (y) and "Overwrite all" when prompted to overwrite existing files and individually `git diff` all changes manually to check out which changes you want to keep and which you want to revert.
```shell
$ quasar ext remove @quasar/testing-unit-jest
$ quasar ext add @quasar/testing-unit-jest
```
## Testing Harnesses Manager
[Check out Testing Harnesses Manager AE documentation](packages/testing/README.md)
## Unit Testing
### [Jest](https://jestjs.io/)
[Check out Jest AE documentation](packages/unit-jest/README.md)
### [AVA](https://github.com/avajs/ava)
```shell
$ quasar ext add @quasar/testing-unit-ava
```
We have included:
- a configuration file `ava.config.js`
- `/test/ava/setup.js`
- `babel.config.js` file
- a `quasar` scaffolding helper
- a 'validity' test that makes sure quasar is initiatable
We have included the optional ability to place your test code inside your vue files, should you choose to do so. It will be rendered by webpack HMR. To run these tests, run `$ quasar test --unit ava --dev`.
```