mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
* doc upddate: documentation_guidelines.md * doc upddate: how_to_contribute.md * doc upddate: testing.md / how_to_contribute.md * doc upddate: translation_contribution.md/testing.md/how_to_contribute.md * doc upddate: coding_conventions.md * fix formatting: how_to_contribute.md * fix formatting (again) : how_to_contribute.md
47 lines
1.1 KiB
Markdown
47 lines
1.1 KiB
Markdown
---
|
||
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, it’s 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.
|
||

|
||
|
||
|
||
<!-- ## WIP
|
||
|
||
## Run the tests
|
||
|
||
#### 1. Install the global dependencies
|
||
|
||
```shell
|
||
npm ci
|
||
npx playwright install --with-deps
|
||
```
|
||
|
||
#### 2. Run tests
|
||
|
||
```shell
|
||
npx playwright test
|
||
```
|
||
|
||
If everything goes well, you should see a `passed` message.
|
||
|
||
 -->
|
||
|
||
|