mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 23:21:08 +02:00
Add 63 unit tests with 100% code coverage for CORS configuration utilities. **Test Coverage:** - createCorsConfig() function (24 tests) - Default behavior and configuration structure - Environment variable parsing (comma-separated, trimming) - includeAllManaApps flag functionality - Custom development origins - Additional origins (mobile apps) - Origin deduplication across all sources - Combined options integration - createCorsConfigWithCallback() function (15 tests) - Callback mode for mobile app support - No origin handling (server-to-server) - Valid/invalid origin validation - Security: protocol-sensitive matching - Callback return value validation - Origin constants (24 tests) - MANACORE_STAGING_ORIGINS validation - MANACORE_PRODUCTION_ORIGINS validation - MANACORE_ALL_APP_ORIGINS combination - URL format validation - Duplicate detection - Consistency between environments **Results:** - 63 tests passing - 100% code coverage (statements, branches, functions, lines) - All edge cases covered (empty values, whitespace, duplicates) **Setup:** - Added Jest with ts-jest for TypeScript support - Added test scripts: test, test:watch, test:coverage - Created jest.config.js with coverage configuration - Proper TypeScript types for callback functions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| better-auth-types | ||
| eslint-config | ||
| mana-core-nestjs-integration | ||
| manadeck-database | ||
| news-database | ||
| nutriphi-database | ||
| shared-api-client | ||
| shared-auth | ||
| shared-auth-stores | ||
| shared-auth-ui | ||
| shared-branding | ||
| shared-config | ||
| shared-credit-service | ||
| shared-errors | ||
| shared-feedback-service | ||
| shared-feedback-types | ||
| shared-feedback-ui | ||
| shared-help-content | ||
| shared-help-mobile | ||
| shared-help-types | ||
| shared-help-ui | ||
| shared-i18n | ||
| shared-icons | ||
| shared-landing-ui | ||
| shared-nestjs-auth | ||
| shared-nestjs-cors | ||
| shared-profile-ui | ||
| shared-splitscreen | ||
| shared-storage | ||
| shared-stores | ||
| shared-subscription-types | ||
| shared-subscription-ui | ||
| shared-supabase | ||
| shared-tags | ||
| shared-tailwind | ||
| shared-theme | ||
| shared-theme-ui | ||
| shared-types | ||
| shared-ui | ||
| shared-utils | ||
| shared-vite-config | ||
| test-config | ||
| uload-database | ||