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
JavaScript
/**
* 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