pull/16737/merge
Elliott Johnson 18 hours ago committed by GitHub
commit 5c68c7a6c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,14 @@
import { flushSync } from 'svelte';
import { test } from '../../test';
export default test({
test({ assert, target, logs }) {
let btn = target.querySelector('button');
btn?.click();
btn?.click();
flushSync();
assert.deepEqual(logs, ['error caught 1', 'error caught 2']);
}
});

@ -0,0 +1,7 @@
<script lang="ts">
import Test from './test.svelte';
</script>
<svelte:boundary onerror={(e) => {console.log('error caught root')}}>
<Test />
</svelte:boundary>

@ -0,0 +1,15 @@
<script>
let count = $state(0);
let test = $derived.by(() => {
if (count > 1) {
throw new Error('test');
}
});
</script>
<svelte:boundary onerror={(e) => {console.log('error caught 1')}}>
<div>Count: {count}</div>
<button onclick={() => count++}>Increment</button>
{count} / {test}
</svelte:boundary>
Loading…
Cancel
Save