TypeScript compilation and type checking:
npm run typecheckThis validates:
- All TypeScript types are correct
- Routes are properly registered
- Schemas match endpoint definitions
- No compilation errors
✅ TypeScript compilation: PASSED ✅ Type checking: PASSED ✅ All routes registered: PASSED ✅ Schemas defined: PASSED
Cloudflare Pages with Advanced Mode (_worker.ts) requires deployment to test properly. The TypeScript files are compiled automatically by Cloudflare Pages on deployment.
Test all endpoints for correct behavior:
# Health checks
curl /api/v1/ping
curl /api/v1/health
# Services - Enhanced with statistics
curl /api/v1/services
# Verify response includes:
# - regionCount for each service
# - providerBreakdown (AWS/Azure counts)
# - configurationBreakdown for vdc_vault
# Service detail endpoints
curl /api/v1/services/vdc_m365
curl /api/v1/services/vdc_vault
curl /api/v1/services/vdc_entra_id
curl /api/v1/services/vdc_salesforce
curl /api/v1/services/vdc_azure_backup
# Verify response includes:
# - service metadata
# - regions array (list of region IDs)
# - providerBreakdown with region lists
# - configurationBreakdown for tiered services
# Service detail error handling
curl /api/v1/services/invalid_service
# Should return 404 with proper error format
# Regions
curl /api/v1/regions
curl /api/v1/regions?provider=AWS
curl /api/v1/regions?service=vdc_vault
curl /api/v1/regions/aws-us-east-1
# OpenAPI docs
curl /api/openapi.json
# Verify new endpoints are documentedTest 1: Response structure
- ✅ Returns
servicesarray - ✅ Returns
countfield - ✅ Each service has
regionCount - ✅ Each service has
providerBreakdown.AWSandproviderBreakdown.Azure - ✅ Tiered services (vdc_vault) have
configurationBreakdown - ✅ Boolean services do not have
configurationBreakdown
Test 2: Data accuracy
- ✅ Region counts are correct for each service
- ✅ Provider breakdown sums equal total regionCount
- ✅ Configuration breakdown counts are accurate
- ✅ All configuration keys follow "Edition-Tier" format
Test 3: Valid service IDs
- ✅
/api/v1/services/vdc_vaultreturns correct data - ✅
/api/v1/services/vdc_m365returns correct data - ✅
/api/v1/services/vdc_entra_idreturns correct data - ✅
/api/v1/services/vdc_salesforcereturns correct data - ✅
/api/v1/services/vdc_azure_backupreturns correct data
Test 4: Response structure for boolean services
- ✅ Returns
serviceobject with metadata - ✅ Returns
regionsarray with region IDs - ✅ Returns
providerBreakdownwith count and regions for AWS and Azure - ✅ Does not include
configurationBreakdown
Test 5: Response structure for tiered services (vdc_vault)
- ✅ Returns
serviceobject with editions and tiers - ✅ Returns
regionsarray with all supporting region IDs - ✅ Returns
providerBreakdownwith region lists - ✅ Returns
configurationBreakdownwith keys like "Foundation-Core" - ✅ Each configuration breakdown entry has
countandregions
Test 6: Data consistency
- ✅ Number of regions in
regionsarray matchesservice.regionCount - ✅ Provider breakdown region lists are mutually exclusive
- ✅ Provider breakdown counts sum to total region count
- ✅ Region IDs in provider breakdown match those in main regions list
- ✅ Configuration breakdown region IDs are all present in main regions list
Test 7: Error handling
- ✅ Invalid service ID returns 404
- ✅ Error response has correct structure (error, code, message, parameter, value, allowedValues)
- ✅ Error code is
SERVICE_NOT_FOUND - ✅ allowedValues lists all valid service IDs
All responses should follow the API contract defined in OpenAPI spec.