- 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>
40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert';
|
|
import { safeImport } from '../_helpers/path.js';
|
|
import { AutoReporter } from '../reporters/AutoReporter.js';
|
|
|
|
const EXPECTED = {
|
|
'LLMManager': [['callModel','invoke','run']],
|
|
'selective-enhancement/SelectiveUtils': [['analyzeTechnicalQuality','analyze','run']],
|
|
'ElementExtraction': [['extractElements','extract','run']],
|
|
'ContentAssembly': [['assembleArticle','assemble','render']],
|
|
'selective-enhancement/SelectiveCore': [['applySelectiveLayer','enhance','run']],
|
|
'MissingKeywords': [['fillMissingKeywords','complete','run']],
|
|
'ArticleStorage': [['workKey','makeKey','keyOf']],
|
|
'DigitalOceanWorkflow': [['deployArticle','deploy','publish']],
|
|
'Main': [['run','main','start']],
|
|
'ManualTrigger': [['main','run','start']],
|
|
'Utils': [[]],
|
|
'trace-wrap': [[]]
|
|
};
|
|
|
|
for (const [name, variants] of Object.entries(EXPECTED)) {
|
|
|
|
// Auto-Reporter Configuration
|
|
const autoReporter = new AutoReporter();
|
|
|
|
test(`Module ${name}: exists and has expected exports (soft)`, async () => {
|
|
const res = await safeImport(name);
|
|
if (!res.ok) { console.warn(`[SKIP] ${name}: ${res.reason}`); return; }
|
|
const mod = res.mod;
|
|
|
|
for (const group of variants) {
|
|
if (group.length === 0) continue;
|
|
const found = group.find(fn => typeof mod[fn] === 'function');
|
|
if (!found) {
|
|
console.warn(`[SKIP] ${name}: none of [${group.join(', ')}] found`);
|
|
}
|
|
}
|
|
});
|
|
}
|