More processing tests

This commit is contained in:
2026-03-16 21:33:05 -05:00
parent a01e733084
commit f1e49c5830
12 changed files with 420 additions and 4 deletions
+13 -1
View File
@@ -24,8 +24,20 @@ fixtures.forEach(fixtureId => {
const fixturePath = join(fixturesDir, fixtureId);
const inputPath = join(fixturePath, 'input.html');
const expectedPath = join(fixturePath, 'expected.md');
const metaPath = join(fixturePath, 'meta.json');
test(`parses ${fixtureId} correctly`, () => {
let description = '';
try {
const metaJson = readFileSync(metaPath, 'utf-8');
const meta = JSON.parse(metaJson);
description = meta.description || '';
} catch {
// meta.json is optional
}
const testName = description ? `${fixtureId}${description}` : fixtureId;
test(`parses ${testName}`, () => {
const inputHtml = readFileSync(inputPath, 'utf-8');
const expectedMarkdown = readFileSync(expectedPath, 'utf-8');