Files
orangecat/tests
g-butandClaude Opus 4.6 9d0b06e001 refactor: harden API routes, domain services, and public pages
Hardening pass across existing code:
- API routes: stricter validation, consistent error responses, auth checks
  (tasks, task-projects, task-requests, task-analytics, assets, services, ai)
- Domain services: reduce duplication via base entity service, tighten input
  validation (assets, causes, commerce, documents, investments, loans, projects, wishlists)
- Public pages: extract shared PublicEntityDetailPage component, reducing
  products/services/causes/events/discover pages by ~1,700 lines
- Components: fix lint warnings (curly braces), harden wallet/funding/onboarding
- Groups: refactor execution, mutations, queries, validation with shared db-helpers
- Config: remove unused ai-model/cat-action entries, consolidate database constants
- Tests: update project-list workflow test, currency test imports

Net: -1,743 lines across 51 files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 13:43:48 +02:00
..

Tests Directory

This directory contains all test files organized by type and purpose.

Directory Structure

  • auth/ - Authentication-related tests
  • e2e/ - End-to-end tests using Playwright
  • manual/ - Manual testing scripts and utilities
  • security/ - Security-focused tests
  • setup/ - Test setup and configuration

Test Types

  • Unit Tests: Located in __tests__/ directories next to source files
  • Integration Tests: API and service integration tests
  • E2E Tests: Full user journey tests using Playwright
  • Security Tests: Security vulnerability and policy tests
  • Manual Tests: Scripts for manual testing scenarios

Running Tests

# All tests
npm test

# Unit tests only
npm run test:unit

# Integration tests
npm run test:integration

# E2E tests
npm run test:e2e

# Security tests
npm run test:security

# Auth tests
npm run test:auth

Test Configuration

  • jest.config.js - Jest configuration
  • playwright.config.ts - Playwright E2E configuration
  • setup.ts - Global test setup
  • TestWrapper.tsx - React testing utilities