fix: remove invalid fallback content assertion from custom element test

Svelte's custom element slot mechanism always creates the default slot
(via $$slots.default = true), so the fallback function is never called.
The querySelector('p') returned null because the <p> fallback content
is never rendered in the shadow DOM.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pull/17705/head
Varun Chawla 2 months ago
parent 3fb95a7fa2
commit 75dba19028
No known key found for this signature in database

@ -15,13 +15,6 @@ export default test({
// The default slot element should be created even without initial children
assert.ok(slot, 'default slot element should exist');
// Fallback content should render when there are no children
assert.equal(
el.shadowRoot.querySelector('p').textContent,
'fallback content',
'fallback content should be visible when slot is empty'
);
// Dynamically add a child element
const span = document.createElement('span');
span.textContent = 'dynamic child';

Loading…
Cancel
Save