Skip to content

fix: jsx issue with images having an empty children property #256

fix: jsx issue with images having an empty children property

fix: jsx issue with images having an empty children property #256

Triggered via push October 28, 2024 07:56
Status Failure
Total duration 20s
Artifacts

test.yml

on: push
Matrix: Unit Test
Fit to window
Zoom out
Zoom in

Annotations

10 errors
src/richtext.test.ts > richtext > blocktypes > should render a paragraph: src/richtext.test.ts#L22
AssertionError: expected '<p>Hello, world!</p>' to be '<p key="p-2">Hello, world!</p>' // Object.is equality Expected: "<p key="p-2">Hello, world!</p>" Received: "<p>Hello, world!</p>" ❯ src/richtext.test.ts:22:20
src/richtext.test.ts > richtext > blocktypes > should render an unordered list: src/richtext.test.ts#L69
AssertionError: expected '<ul><li>Item 1</li><li>Item 2</li></u…' to be '<ul key="ul-5"><li key="li-3">Item 1<…' // Object.is equality Expected: "<ul key="ul-5"><li key="li-3">Item 1</li><li key="li-5">Item 2</li></ul>" Received: "<ul><li>Item 1</li><li>Item 2</li></ul>" ❯ src/richtext.test.ts:69:20
src/richtext.test.ts > richtext > blocktypes > should render an ordered list: src/richtext.test.ts#L99
AssertionError: expected '<ol order="1"><li>Item 1</li><li>Item…' to be '<ol order="1" key="ol-5"><li key="li-…' // Object.is equality Expected: "<ol order="1" key="ol-5"><li key="li-3">Item 1</li><li key="li-5">Item 2</li></ol>" Received: "<ol order="1"><li>Item 1</li><li>Item 2</li></ol>" ❯ src/richtext.test.ts:99:20
src/richtext.test.ts > richtext > blocktypes > should render an image with attrs: src/richtext.test.ts#L120
AssertionError: expected '<img src="https://example.com/image.j…' to be '<img src="https://example.com/image.j…' // Object.is equality Expected: "<img src="https://example.com/image.jpg" alt="An image" title="An image" key="img-1" />" Received: "<img src="https://example.com/image.jpg" alt="An image" title="An image" key="img-1" >" ❯ src/richtext.test.ts:120:20
src/richtext.test.ts > richtext > blocktypes > should render self-closing tags: src/richtext.test.ts#L141
AssertionError: expected '<hr >' to be '<hr key="hr-1" />' // Object.is equality Expected: "<hr key="hr-1" />" Received: "<hr >" ❯ src/richtext.test.ts:141:22 ❯ src/richtext.test.ts:135:29
src/richtext.test.ts > richtext > blocktypes > should render an emoji: src/richtext.test.ts#L154
AssertionError: expected '<span data-type="emoji" data-name="un…' to be '<span data-type="emoji" data-name="un…' // Object.is equality Expected: "<span data-type="emoji" data-name="undefined" emoji="🚀" key="emoji-1"><img src="undefined" alt="undefined" style="width: 1.25em; height: 1.25em; vertical-align: text-top" draggable="false" loading="lazy" /></span>" Received: "<span data-type="emoji" data-name="undefined" emoji="🚀" key="emoji-1"><img src="undefined" alt="undefined" style="width: 1.25em; height: 1.25em; vertical-align: text-top" draggable="false" loading="lazy" ></span>" ❯ src/richtext.test.ts:154:20
src/richtext.test.ts > richtext > blocktypes > should render a horizontal rule: src/richtext.test.ts#L178
AssertionError: expected '<hr >' to be '<hr key="hr-1" />' // Object.is equality Expected: "<hr key="hr-1" />" Received: "<hr >" ❯ src/richtext.test.ts:178:20
src/richtext.test.ts > richtext > blocktypes > should render a break: src/richtext.test.ts#L187
AssertionError: expected '<br >' to be '<br key="br-1" />' // Object.is equality Expected: "<br key="br-1" />" Received: "<br >" ❯ src/richtext.test.ts:187:20
src/richtext.test.ts > richtext > blocktypes > should render a quote: src/richtext.test.ts#L207
AssertionError: expected '<blockquote><p>Quote</p></blockquote>' to be '<blockquote key="blockquote-3"><p key…' // Object.is equality Expected: "<blockquote key="blockquote-3"><p key="p-3">Quote</p></blockquote>" Received: "<blockquote><p>Quote</p></blockquote>" ❯ src/richtext.test.ts:207:20
src/richtext.test.ts > richtext > textTypes & MarksTypes > should render text with marks: src/richtext.test.ts#L225
AssertionError: expected '<p><em key="em-5"><strong key="strong…' to be '<p key="p-5"><em key="em-5"><strong k…' // Object.is equality Expected: "<p key="p-5"><em key="em-5"><strong key="strong-4">Bold and italic</strong></em></p>" Received: "<p><em key="em-5"><strong key="strong-4">Bold and italic</strong></em></p>" ❯ src/richtext.test.ts:225:20