summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-27 18:37:18 +0200
committerArmand Philippot <git@armandphilippot.com>2022-06-02 19:10:28 +0200
commit0622e6febf76db3585073a993f954dd1369a8eb4 (patch)
tree88457301916968fdd3e214579757e2579a3951d4 /README.md
parentf349437f7ed3d110ec609ab0bf5c622b6a4dfdb8 (diff)
docs: add a section about Testing
Diffstat (limited to 'README.md')
-rw-r--r--README.md28
1 files changed, 27 insertions, 1 deletions
diff --git a/README.md b/README.md
index e11189b..fae8a5f 100644
--- a/README.md
+++ b/README.md
@@ -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).