This directory contains the test suite for the ProjectFlow application, organized into three main categories:
Located in the unit/ directory, these tests focus on testing individual components and functions in isolation. They verify that each unit of code works as expected without dependencies on external systems.
make test-unitLocated in the integration/ directory, these tests verify that different components of the system work together correctly. They test the interaction between multiple units and may involve database operations.
make test-integrationLocated in the e2e/ directory, these tests simulate real user scenarios and test the entire application stack from the frontend to the backend. They use Cypress to automate browser interactions.
make test-e2eNote: E2E tests require both the frontend and backend servers to be running.
To generate a test coverage report:
make test-coverageThis will create a coverage.html file that you can open in your browser to see which parts of the code are covered by tests.
- Unit Tests: Test individual functions and methods in isolation
- Integration Tests: Test interactions between components
- E2E Tests: Test complete user flows from the frontend to the backend
For unit and integration tests that require external dependencies, we use mocks to simulate these dependencies. This allows us to test components in isolation without relying on external systems.
All tests are run automatically on each pull request and must pass before merging.