Skip to content

Commit 1af292c

Browse files
committed
chore: better test
1 parent ffa1527 commit 1af292c

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

packages/svelte/tests/migrate/samples/slots-custom-element/input.svelte

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<svelte:options customElement="my-element" />
22

3-
<button><slot /></button>
3+
<script>
4+
// to show that it doesn't bail out from the whole migration
5+
let count = 0;
6+
</script>
7+
8+
<button on:click={()=>count++}><slot /></button>
9+
10+
{count}
411

512
{#if foo}
613
<slot name="foo" {foo} />

packages/svelte/tests/migrate/samples/slots-custom-element/output.svelte

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<svelte:options customElement="my-element" />
22

3-
<button><slot /></button>
3+
<script>
4+
// to show that it doesn't bail out from the whole migration
5+
let count = $state(0);
6+
</script>
7+
8+
<button onclick={()=>count++}><slot /></button>
9+
10+
{count}
411

512
{#if foo}
613
<slot name="foo" {foo} />

0 commit comments

Comments
 (0)