LibreChat/docs/contributions/testing.md
Danny Avila 7f83a060a0
🔍 chore: Clean Up Documentation (#2217)
* fix(initializeClient.spec.js): remove condition failing test on local installations

* docs: remove comments and invalid html as is required by embeddings generator and add new documentation guidelines
2024-03-26 13:40:00 -04:00

25 lines
758 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 🧪 Testing During Development
description: How to locally test the app during development.
weight: -6
---
# Locally test the app during development
## Local Unit Tests
Before submitting your updates, its crucial to 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
cp .env.example ./api/.env
```
- add `NODE_ENV=CI` to your `/api/.env` file
- `npm run test:client`
- `npm run test:api`
!!! failure "Warning"
When executed locally, this API unit test is expected to fail. This should be the only error encountered.
![image](https://github.com/danny-avila/LibreChat/assets/32828263/d222034c-9c3a-4764-b972-39e954c92170)