melissamcewen curlsbotAPI .cursorrules file for TypeScript (stars: 1)

## 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.
bun
golang
javascript
less
typescript

First Time Repository

TypeScript library powering CurlsBot's haircare product analysis engine, featuring ingredient validation, automated data management, and comprehensive testing infrastructure

TypeScript

Languages:

JavaScript: 3.1KB
TypeScript: 435.0KB
Created: 12/5/2024
Updated: 1/22/2025

All Repositories (1)

TypeScript library powering CurlsBot's haircare product analysis engine, featuring ingredient validation, automated data management, and comprehensive testing infrastructure