Skip to main content

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.

docker compose run --rm 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

docker compose run --rm web yarn test