# Unit Tests

Tests are run automatically using GitHub Actions and are defined [here](https://github.com/IQTLabs/packet_cafe/blob/master/.github/workflows/test.yml). Currently there are tests written for the `ui` container and the `web` container.

The `ui` container uses `npm` for running unit tests and the `web` container uses `py.test` . Each container has a `Dockerfile.test` defined that runs each container's respective tests.

To add more tests, add them relative to each component, as opposed to globally at the root of the project. This allows components to be build and tested without having to rely on the entire ecosystem of the project.

{% hint style="warning" %}
Be aware that currently there are no integration tests.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://iqtlabs.gitbook.io/packet-cafe/testing/unit-tests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
