3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 23:25:43 +01:00

Answer architecture round 5: 0 🔴, 0 🟡 (0 misread); shownImage returns no textless state, item 143 and the card rule name their whole reach

This commit is contained in:
2026-10-26 12:58:17 +01:00
committed by Lillem4n
parent 9ff53c1658
commit e20a1c3a30
6 changed files with 23 additions and 19 deletions
+2 -2
View File
@@ -48,9 +48,9 @@ test('shows an image a link to another target marks by its alt, else the target,
assert.deepEqual(shownImage({ attrs: { type: 'external', url: moon }, type: 'media' }, ' '), { after: moon, link: undefined, text: moon })
})
test('shows an image with no URL by its alt, else by no text, a note standing in its place', () => {
test('shows an image with no URL by its alt, else nothing, a note standing in its place', () => {
assert.deepEqual(shownImage({ attrs: { alt: 'The moon', type: 'file' }, type: 'media' }, target), { after: undefined, link: undefined, text: 'The moon' })
assert.deepEqual(shownImage({ attrs: { type: 'file' }, type: 'mediaInline' }, undefined), { after: undefined, link: undefined, text: undefined })
assert.equal(shownImage({ attrs: { type: 'file' }, type: 'mediaInline' }, undefined), undefined)
assert.deepEqual(shownImage({ attrs: { alt: 'The moon', type: 'external', url: ' ' }, type: 'media' }, undefined), { after: undefined, link: undefined, text: 'The moon' })
})