diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e80b0d095..b1bcd39e10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Try using `globalThis` rather than `globals` for the benefit of non-Node servers and web workers ([#3561](https://github.com/sveltejs/svelte/issues/3561), [#4545](https://github.com/sveltejs/svelte/issues/4545)) * Support `{#await ... catch ...}` syntax shorthand ([#3623](https://github.com/sveltejs/svelte/issues/3623)) * Fix attaching of JS debugging comments to HTML comments ([#4565](https://github.com/sveltejs/svelte/issues/4565)) +* Fix `` within `` ([#4597](https://github.com/sveltejs/svelte/issues/4597)) * Fix issues with `` updates ([#4631](https://github.com/sveltejs/svelte/issues/4631), [#4687](https://github.com/sveltejs/svelte/issues/4687)) * Prevent illegal attribute names ([#4648](https://github.com/sveltejs/svelte/issues/4648)) * Fix `{#if}` block directly within `` ([#4703](https://github.com/sveltejs/svelte/issues/4703)) diff --git a/test/runtime/samples/component-slot-fallback-5/IconA.svelte b/test/runtime/samples/component-slot-fallback-5/IconA.svelte new file mode 100644 index 0000000000..8921b6c531 --- /dev/null +++ b/test/runtime/samples/component-slot-fallback-5/IconA.svelte @@ -0,0 +1 @@ +Icon A \ No newline at end of file diff --git a/test/runtime/samples/component-slot-fallback-5/IconB.svelte b/test/runtime/samples/component-slot-fallback-5/IconB.svelte new file mode 100644 index 0000000000..8a1a95ead3 --- /dev/null +++ b/test/runtime/samples/component-slot-fallback-5/IconB.svelte @@ -0,0 +1 @@ +Icon B \ No newline at end of file diff --git a/test/runtime/samples/component-slot-fallback-5/Inner.svelte b/test/runtime/samples/component-slot-fallback-5/Inner.svelte new file mode 100644 index 0000000000..bc4b224c23 --- /dev/null +++ b/test/runtime/samples/component-slot-fallback-5/Inner.svelte @@ -0,0 +1,13 @@ + + + +
+ + + +
diff --git a/test/runtime/samples/component-slot-fallback-5/_config.js b/test/runtime/samples/component-slot-fallback-5/_config.js new file mode 100644 index 0000000000..fa374f3519 --- /dev/null +++ b/test/runtime/samples/component-slot-fallback-5/_config.js @@ -0,0 +1,31 @@ +export default { + html: ` + +
Icon B
+ `, + + async test({ assert, target, window }) { + const btn = target.querySelector("button"); + const clickEvent = new window.MouseEvent("click"); + + await btn.dispatchEvent(clickEvent); + + assert.htmlEqual( + target.innerHTML, + ` + +
Icon A
+ ` + ); + + await btn.dispatchEvent(clickEvent); + + assert.htmlEqual( + target.innerHTML, + ` + +
Icon B
+ ` + ); + } +}; diff --git a/test/runtime/samples/component-slot-fallback-5/main.svelte b/test/runtime/samples/component-slot-fallback-5/main.svelte new file mode 100644 index 0000000000..206ce21def --- /dev/null +++ b/test/runtime/samples/component-slot-fallback-5/main.svelte @@ -0,0 +1,5 @@ + + +