mirror of https://github.com/sveltejs/svelte
parent
1d68216a0f
commit
184882c104
@ -0,0 +1,15 @@
|
||||
import { ok, test } from '../../test';
|
||||
import { flushSync } from 'svelte';
|
||||
|
||||
export default test({
|
||||
html: `<p>0</p>`,
|
||||
|
||||
async test({ assert, target, instance }) {
|
||||
const p = target.querySelector('p');
|
||||
ok(p);
|
||||
flushSync(() => {
|
||||
instance.count++;
|
||||
});
|
||||
assert.equal(p.innerHTML, '1');
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
let { count=0 } = $props();
|
||||
|
||||
export {
|
||||
count
|
||||
}
|
||||
</script>
|
||||
|
||||
<p>{count}</p>
|
||||
Loading…
Reference in new issue