-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cursorrules
26 lines (20 loc) · 985 Bytes
/
.cursorrules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Testing Guidelines
### 1. Directory Structure
- Place all tests in the `./tests` directory
- End-to-end (e2e) tests go in the `./tests/e2e` directory
### 2. Naming Conventions
- Name test files after the file they test
- Example: `analyzer.test.ts` corresponds to `analyzer.ts`
- **Exception:** End-to-end (e2e) tests do not follow this naming convention
### 3. Data in tests
- Tests in the `e2e` directory use the **production database** `src/data/bundleddata.ts`
- Integration tests should use the test database `tests/fixtures/test_bundled_data.ts`
- Unit tests should test data defined within the test file
### 4. Data Files
- You may **read** from `src/data` files, but do not edit them
- If a change is required, ask first since these files are sourced from a database
### 5. Testing Practices
- Avoid using mocks
- Avoid using objectContaining unless the object is very simple
---
Following these rules will ensure consistent and reliable testing across the project.