Testing
API
The application has two types of API tests: unit tests and integration tests.
Unit tests
You will find unit tests under src/tests/unit
.
- Using docker
- Without using docker
docker compose run --rm api pytest
cd api/
pytest
As a general rule, unit tests should not have any external dependencies - especially on the file system.
Integration tests
The integrations tests can be found under src/tests/integration
.
To run integration tests add --integration
as argument for pytest.
These tests depends on mongodb and that it's running.
Web
Unit tests
- Using docker
- Without using docker
docker compose run --rm web yarn test
cd web/
yarn test