Skip to content

Commit

Permalink
failing test for content in same slot
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbethel committed Jun 18, 2024
1 parent 92c9caf commit c1c57e6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/enhance.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,3 +1102,28 @@ test('multiple slots with unnamed slot first', t => {
)
t.end()
})

test('multiple items in the same slot', t => {
const html = enhance({
bodyContent: true,
elements: {
'multiple-slots': MultipleSlots,
}
})
const actual = html`
<multiple-slots>unnamed slot<div slot="slot1">slot One</div><div slot="slot1">more One</div><div slot="slot1">even more One</div></multiple-slots>
`
const expected = `
<multiple-slots enhanced="✨">
unnamed slot<div slot="slot1">slot One</div>
<div slot="slot1">more One</div>
<div slot="slot1">even more One</div>
</multiple-slots>
`
t.equal(
strip(actual),
strip(expected),
'multiple items in the same slot'
)
t.end()
})

0 comments on commit c1c57e6

Please sign in to comment.