mirror of
https://github.com/davila7/claude-code-templates.git
synced 2026-09-19 01:30:23 +08:00
598aac0e6b
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>
24 lines
602 B
JavaScript
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
|
|
};
|