UNPKG

adpa-enterprise-framework-automation

Version:

Modular, standards-compliant Node.js/TypeScript automation framework for enterprise requirements, project, and data management. Provides CLI and API for BABOK v3, PMBOK 7th Edition, and DMBOK 2.0 (in progress). Production-ready Express.js API with TypeSpe

51 lines โ€ข 2.12 kB
/** * Test Migration Layer * Validates the backward compatibility of the new AI architecture */ import * as legacyProcessor from '../../modules/llmProcessor'; import * as migrationProcessor from '../../modules/llmProcessor-migration'; import { MigrationHelperProcessor } from '../../modules/llmProcessor-migration'; const TEST_CONTEXT = ` # Requirements Gathering Agent An AI-powered tool for generating comprehensive project documentation following PMBOK standards. `; /** * Compare results between legacy and migrated processors */ async function compareProcessors() { console.log('๐Ÿงช Testing Migration Layer...'); // Test basic AI operations console.log('\n๐Ÿ“ Testing Basic AI Operations...'); // Compare message creation const systemPrompt = "You are a technical writer."; const userPrompt = "Summarize the project."; const legacyMessages = legacyProcessor.createMessages(systemPrompt, userPrompt); const migrationMessages = MigrationHelperProcessor.createMessages(systemPrompt, userPrompt); console.log('Message Creation:', JSON.stringify(legacyMessages) === JSON.stringify(migrationMessages) ? 'โœ… Match' : 'โŒ Mismatch'); // Test document generation console.log('\n๐Ÿ“„ Testing Document Generation...'); try { // Test user stories generation const [legacyStories, migrationStories] = await Promise.all([ legacyProcessor.getAiUserStories(TEST_CONTEXT), migrationProcessor.getAiUserStories(TEST_CONTEXT) ]); console.log('User Stories Generation:', typeof legacyStories === typeof migrationStories ? 'โœ… Types Match' : 'โŒ Type Mismatch'); if (legacyStories && migrationStories) { console.log('Content Length:', Math.abs(legacyStories.length - migrationStories.length) < 100 ? 'โœ… Similar' : 'โš ๏ธ Different'); } } catch (error) { console.error('โŒ Test failed:', error.message); } } // Run comparison tests compareProcessors(); //# sourceMappingURL=testMigrationLayer.js.map