Files
Dani 598aac0e6b test: Add comprehensive API testing and deployment documentation
Critical Infrastructure Protection:
- Comprehensive test suite for all API endpoints
- Pre-deployment validation script
- Detailed API architecture documentation in CLAUDE.md

Test Suite (__tests__/endpoints.test.js):
- Critical endpoint availability checks
- Component download tracking validation
- Discord bot integration tests
- Claude Code changelog monitor tests
- Security & CORS validation
- Response time validation

Pre-Deployment Script (scripts/predeploy-check.sh):
- Git status validation
- Node.js & npm version checks
- Automatic dependency installation
- API test execution
- File structure validation
- Environment variable checklist
- Vercel configuration validation

Documentation Updates:
- API Architecture & Deployment section in CLAUDE.md
- Endpoint specifications and usage
- Testing procedures
- Deployment workflow
- Troubleshooting guides
- Emergency rollback procedures
- api/README.md with quick reference

This ensures the critical /api/track-download-supabase endpoint
(used by ALL component installations) never breaks during deployments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 14:22:13 -04:00

24 lines
602 B
JavaScript

/**
* Jest Configuration for API Tests
*
* This configuration is designed to test production API endpoints
* to ensure critical functionality doesn't break during deployments.
*/
module.exports = {
testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.test.js'],
collectCoverageFrom: [
'*.js',
'!node_modules/**',
'!__tests__/**',
'!jest.config.cjs',
'!coverage/**'
],
coverageDirectory: 'coverage',
verbose: true,
testTimeout: 30000, // 30 seconds default timeout
bail: false, // Run all tests even if some fail
maxWorkers: 4, // Run tests in parallel
};