seogeneratorserver/tests/smoke/modules-shape.test.js
StillHammer dbf1a3de8c Add technical plan for multi-format export system
Added plan.md with complete architecture for format-agnostic content generation:
- Support for Markdown, HTML, Plain Text, JSON formats
- New FormatExporter module with neutral data structure
- Integration strategy with existing ContentAssembly and ArticleStorage
- Bonus features: SEO metadata generation, readability scoring, WordPress Gutenberg format
- Implementation roadmap with 4 phases (6h total estimated)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 16:14:29 +08:00

35 lines
1.3 KiB
JavaScript

import test from 'node:test';
import assert from 'node:assert';
import { safeImport } from '../_helpers/path.js';
const EXPECTED = {
'LLMManager': [['callModel','invoke','run']],
'ContentGeneration': [['generateArticleParts','generate','run']],
'ElementExtraction': [['extractElements','extract','run']],
'ContentAssembly': [['assembleArticle','assemble','render']],
'SelectiveEnhancement': [['enhanceParts','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)) {
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`);
}
}
});
}