- Create complete integration test system (test-integration.js) - Add UI/UX interaction testing with real event simulation (test-uiux-integration.js) - Implement end-to-end scenario testing for user journeys (test-e2e-scenarios.js) - Add console testing commands for rapid development testing (test-console-commands.js) - Create comprehensive test guide documentation (TEST-GUIDE.md) - Integrate test buttons in debug panel (F12 → 3 test types) - Add vocabulary modal two-progress-bar system integration - Fix flashcard retry system for "don't know" cards - Update IntelligentSequencer for task distribution validation 🧪 Testing Coverage: - 35+ integration tests (architecture/modules) - 20+ UI/UX tests (real user interactions) - 5 E2E scenarios (complete user journeys) - Console commands for rapid testing - Debug panel integration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
36 lines
1.4 KiB
JavaScript
36 lines
1.4 KiB
JavaScript
// Debug DeepSeek API key loading
|
|
import { config } from 'dotenv';
|
|
import { default as IAEngine } from './src/DRS/services/IAEngine.js';
|
|
|
|
async function debugDeepSeekKeys() {
|
|
config();
|
|
|
|
console.log('🔍 DeepSeek API key debugging...');
|
|
console.log('DEEPSEEK_API_KEY exists:', !!process.env.DEEPSEEK_API_KEY);
|
|
console.log('DEEPSEEK_API_KEY length:', process.env.DEEPSEEK_API_KEY?.length);
|
|
console.log('DEEPSEEK_API_KEY preview:', process.env.DEEPSEEK_API_KEY?.substring(0, 20) + '...');
|
|
|
|
// Test IAEngine loading
|
|
const engine = new IAEngine();
|
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
|
|
console.log('\n🔍 IAEngine API keys loaded:');
|
|
console.log('Available keys:', Object.keys(engine.apiKeys || {}));
|
|
console.log('DeepSeek key in engine:', !!engine.apiKeys?.DEEPSEEK_API_KEY);
|
|
if (engine.apiKeys?.DEEPSEEK_API_KEY) {
|
|
console.log('DeepSeek key value:', engine.apiKeys.DEEPSEEK_API_KEY.substring(0, 20) + '...');
|
|
}
|
|
|
|
// Test direct DeepSeek call
|
|
try {
|
|
console.log('\n🧪 Testing direct DeepSeek call...');
|
|
const result = await engine.validateEducationalContent('Test', {
|
|
preferredProvider: 'deepseek'
|
|
});
|
|
console.log('✅ DeepSeek works! Provider:', result.provider);
|
|
} catch (error) {
|
|
console.log('❌ DeepSeek failed:', error.message);
|
|
}
|
|
}
|
|
|
|
debugDeepSeekKeys().catch(console.error); |