fix: last diffs in transformation

This commit is contained in:
2026-02-15 20:03:18 +01:00
parent c515f7c227
commit e8a768544d
4 changed files with 8 additions and 5 deletions

View File

@@ -805,8 +805,8 @@ describe('ImportAnalysisEngine', () => {
const report = await engine.analyzeWxr(wxrData, '/test.xml');
// Should use title as alt text and include title in markdown
expect(report.posts.items[0].markdownPreview).toContain('![My Title](http://example.com/full.jpg "My Title")');
// Should use title as alt text (but not include title in markdown - cleaner output)
expect(report.posts.items[0].markdownPreview).toContain('![My Title](http://example.com/full.jpg)');
});
it('should extract filename as alt text when both alt and title are empty', async () => {

View File

@@ -440,13 +440,14 @@ describe('ImportExecutionEngine E2E Tests', () => {
// Linked image with empty alt should become a plain image with filename-derived alt
// The link target is the full-size image, so use that for the image src
expect(content).toContain('![full-size.png](http://example.com/wp-content/uploads/2020/03/full-size.png)');
// Note: extension is stripped from alt text for cleaner output
expect(content).toContain('![full-size](http://example.com/wp-content/uploads/2020/03/full-size.png)');
// Linked image with no alt attribute (link and image different)
expect(content).toContain('![photo.jpg](http://example.com/gallery/photo.jpg)');
expect(content).toContain('![photo](http://example.com/gallery/photo.jpg)');
// Linked image where link and src are the same
expect(content).toContain('![photo.jpg](http://example.com/photo.jpg)');
expect(content).toContain('![photo](http://example.com/photo.jpg)');
// Image with proper alt inside link should preserve the alt text
expect(content).toContain('![Company Logo](http://example.com/logo.png)');