Files
Danny Avila f9ff792e2d chore: update contributing docs (#510)
* chore: update documentation for project architecture, coding standards, and testing procedures

- Updated the project architecture overview to clarify monorepo structure and workspace boundaries.
- Expanded coding standards section to include detailed guidelines on workspace boundaries, code structure, iteration, performance, type safety, and documentation practices.
- Improved testing documentation by specifying how to run tests per workspace and providing clearer instructions for local unit tests.

* fix: remove outdated blog post link in Agents API documentation

- Removed the link to the blog post regarding the Open Responses decision, as it is no longer relevant. This update ensures the documentation remains concise and focused on current API frameworks.
2026-02-19 16:16:09 -05:00

33 lines
933 B
Plaintext

---
title: Testing During Development
icon: TestTube
description: How to locally test the app during development.
---
## Local Unit Tests
Before submitting your updates, verify they pass all unit tests. Follow these steps to run tests locally:
- Copy your `.env.example` file in the `/api` folder and rename it to `.env`
```bash filename="create a /api/.env file"
cp .env.example ./api/.env
```
- Add `NODE_ENV=CI` to your `/api/.env` file
- `npm run test:client`
- `npm run test:api`
### Running Tests Per-Workspace
Tests are run using Jest from their respective workspace directories. Target specific test files with patterns:
```bash
cd api && npx jest <pattern>
cd packages/api && npx jest <pattern>
cd client && npx jest <pattern>
```
<Callout type="tip" title="Tip">
Use `test/layout-test-utils` for rendering components in frontend tests. Cover loading, success, and error states for UI/data flows.
</Callout>