- Fix BatchProcessor constructor to avoid server blocking during startup - Add comprehensive integration tests for all modular combinations - Enhance CLAUDE.md documentation with new test commands - Update SelectiveLayers configuration for better LLM allocation - Add AutoReporter system for test automation - Include production workflow validation tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert';
|
|
import { requireCommonJS } from './_helpers/commonjs-bridge.js';
|
|
import { AutoReporter } from './reporters/AutoReporter.js';
|
|
|
|
/**
|
|
* SIMPLE VERIFICATION - Test que le système marche de bout en bout
|
|
*/
|
|
|
|
const autoReporter = new AutoReporter();
|
|
|
|
const mockCsvData = {
|
|
mc0: 'test simple',
|
|
t0: 'Test de vérification',
|
|
personality: {
|
|
nom: 'Marc',
|
|
style: 'technique'
|
|
}
|
|
};
|
|
|
|
const mockContent = {
|
|
'Titre_H1': 'Test simple pour vérifier le système'
|
|
};
|
|
|
|
test('Verification lightEnhancement', { timeout: 20000 }, async () => {
|
|
autoReporter.onTestStart('Verification lightEnhancement');
|
|
|
|
const { applyPredefinedStack } = requireCommonJS('selective-enhancement/SelectiveLayers');
|
|
const result = await applyPredefinedStack(mockContent, 'lightEnhancement', {
|
|
csvData: mockCsvData,
|
|
analysisMode: true
|
|
});
|
|
|
|
assert.ok(result, 'lightEnhancement doit retourner un résultat');
|
|
assert.ok(result['Titre_H1'], 'Le titre doit être amélioré');
|
|
});
|
|
|
|
test.after(() => {
|
|
console.log(`DEBUG: Tests capturés: ${autoReporter.testResults.length}`);
|
|
console.log(`DEBUG: LLM calls: ${autoReporter.llmCalls.length}`);
|
|
autoReporter.generateReport();
|
|
}); |