failing test

pull/15820/head
Rich Harris 4 months ago
parent 76b07e5b57
commit 63950858d6

@ -0,0 +1,13 @@
import { flushSync } from 'svelte';
import { test } from '../../test';
export default test({
html: `<button>10</button>`,
ssrHtml: `<button>0</button>`,
async test({ assert, target }) {
flushSync();
assert.htmlEqual(target.innerHTML, `<button>10</button>`);
}
});

@ -0,0 +1,12 @@
<script>
const counter = new class Counter {
constructor() {
this.count = $state(0);
$effect(() => {
this.count = 10;
});
}
}
</script>
<button on:click={() => counter.count++}>{counter.count}</button>
Loading…
Cancel
Save