mirror of https://github.com/sveltejs/svelte
commit
0c226fcf4e
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: don't treat declaration tags as parts inside each blocks
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
import { flushSync } from 'svelte';
|
||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
async test({ target, assert }) {
|
||||||
|
const [btn1, btn2] = target.querySelectorAll('button');
|
||||||
|
flushSync(() => btn2.click());
|
||||||
|
assert.equal(btn1.textContent, '1');
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{#each Array(1)}
|
||||||
|
{let ref = $state()}
|
||||||
|
{let count = $state(0)}
|
||||||
|
<button onclick={()=>count++} bind:this={ref}>{count}</button>
|
||||||
|
<button onclick={()=>ref.click()}></button>
|
||||||
|
{/each}
|
||||||
Loading…
Reference in new issue