chore: add test for accessors

pull/13456/head
paoloricciuti 2 years ago
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…
Cancel
Save