UNPKG

supa-seed

Version:

A constraint-aware, framework-agnostic database seeding framework with deep PostgreSQL business logic discovery and MakerKit integration support

131 lines 3.41 kB
/** * v2.2.0 Constraint-Aware Architecture Test Suite * Comprehensive testing for constraint discovery, workflow generation, and execution * Part of supa-seed v2.2.0 constraint-aware architecture */ import type { createClient } from '@supabase/supabase-js'; type SupabaseClient = ReturnType<typeof createClient>; export interface TestScenario { id: string; name: string; description: string; type: 'unit' | 'integration' | 'end_to_end'; category: 'constraint_discovery' | 'workflow_generation' | 'workflow_execution' | 'migration'; priority: 'high' | 'medium' | 'low'; dependencies?: string[]; } export interface TestResult { scenarioId: string; success: boolean; duration: number; details: { description: string; expectedResult: any; actualResult: any; assertions: AssertionResult[]; }; warnings: string[]; errors: string[]; } export interface AssertionResult { description: string; passed: boolean; expected: any; actual: any; message?: string; } export interface TestSuiteResult { success: boolean; totalTests: number; passedTests: number; failedTests: number; skippedTests: number; duration: number; results: TestResult[]; summary: { constraintDiscoveryTests: { passed: number; total: number; }; workflowGenerationTests: { passed: number; total: number; }; workflowExecutionTests: { passed: number; total: number; }; migrationTests: { passed: number; total: number; }; overallSuccess: number; }; recommendations: string[]; } export declare class ConstraintAwareTestSuite { private client; private constraintEngine; private workflowGenerator; private workflowExecutor; private testResults; constructor(client: SupabaseClient); /** * Run the complete v2.2.0 constraint-aware test suite */ runTestSuite(): Promise<TestSuiteResult>; /** * Run constraint discovery tests */ private runConstraintDiscoveryTests; /** * Run a specific constraint discovery test */ private runConstraintDiscoveryTest; /** * Test basic table discovery */ private testBasicTableDiscovery; /** * Test business rule discovery */ private testBusinessRuleDiscovery; /** * Test dependency discovery */ private testDependencyDiscovery; /** * Test MakerKit-specific constraint discovery */ private testMakerKitConstraintDiscovery; /** * Run workflow generation tests */ private runWorkflowGenerationTests; /** * Run a specific workflow generation test */ private runWorkflowGenerationTest; /** * Run workflow execution tests (placeholder - would need real database setup) */ private runWorkflowExecutionTests; /** * Run migration tests (placeholder) */ private runMigrationTests; /** * Get test scenarios */ private getTestScenarios; /** * Generate test suite result summary */ private generateTestSuiteResult; /** * Log test suite results */ private logTestSuiteResult; } export {}; //# sourceMappingURL=constraint-aware-test-suite.d.ts.map