diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-27 18:37:18 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-06-02 19:10:28 +0200 |
| commit | 0622e6febf76db3585073a993f954dd1369a8eb4 (patch) | |
| tree | 88457301916968fdd3e214579757e2579a3951d4 /README.md | |
| parent | f349437f7ed3d110ec609ab0bf5c622b6a4dfdb8 (diff) | |
docs: add a section about Testing
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -37,7 +37,15 @@ Other contents come from WordPress as headless CMS. ## Production -In any case, you need a reverse-proxy if you want to bind the live app to a domain. +### First step + +Clone this repo, then: + +```bash +cp .env.example .env +``` + +Then, in any case, you need a reverse-proxy if you want to bind the live app to a domain. ### With Docker @@ -120,6 +128,24 @@ Once ready, run to update the website translation: yarn run i18n:compile ``` +## Testing + +This project is configured to support both [Jest](https://jestjs.io/) and [Cypress](https://docs.cypress.io/) tests with [Testing Library](https://testing-library.com/). + +You can run both tests with `yarn test`. + +### Jest + +The tests are located alongside components (`src/components/`). + +You can run Jest tests with `yarn test:unit`. + +### Cypress + +The tests are located in `tests/cypress/e2e/`. All texts (to find an element) needs to be written in French since Next.js is configured to only accept this language. + +You can run Cypress tests with `yarn test:e2e`. + ## Licenses The source code is licensed under the [MIT license](./LICENSE). |
