Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// @ts-nocheck
export default {
compileOptions: {
dev: false
},
async test({ assert, target, window }) {
// 1. Wait for the async await block to resolve
await Promise.resolve();
await Promise.resolve();

const input = target.querySelector('input');
const p = target.querySelector('p');

// 2. Simulate user typing "updated"
input.value = 'updated';
input.dispatchEvent(new window.Event('input'));

// 3. Wait for reactivity
await Promise.resolve();

// 4. Assert
assert.equal(p.innerHTML, 'Value: updated');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<script>
let items = $state(['initial']);
</script>

<svelte:boundary onerror={() => {}}>
{#await Promise.resolve()}
{:then}
<input bind:value={items[0]} />
{/await}
</svelte:boundary>

<p>Value: {items[0]}</p>
Loading