Skip to content

Commit e0aca01

Browse files
committed
add test
1 parent 098047b commit e0aca01

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

packages/svelte/tests/runtime-runes/samples/hydrate-modified-input-group/_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default test({
1212

1313
assert.htmlEqual(
1414
target.innerHTML,
15-
'<input type="radio" value="1"><input type="radio" value="2"><input type="radio" value="3">\n2'
15+
'<input name="foo" type="radio" value="1"><input name="foo" type="radio" value="2"><input name="foo" type="radio" value="3">\n2'
1616
);
1717
}
1818
});

packages/svelte/tests/runtime-runes/samples/hydrate-modified-input-group/main.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</script>
44

55
{#each [1, 2, 3] as number}
6-
<input type="radio" value={number} bind:group={value}>
6+
<input type="radio" name="foo" value={number} bind:group={value}>
77
{/each}
88

99
{value}

playgrounds/demo/src/entry-client.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ import App from './App.svelte';
44
const root = document.getElementById('root')!;
55
const render = root.firstChild?.nextSibling ? hydrate : mount;
66

7-
const component = render(App, {
8-
target: document.getElementById('root')!
9-
});
10-
// @ts-ignore
11-
window.unmount = () => unmount(component);
7+
setTimeout(() => {
8+
const component = render(App, {
9+
target: document.getElementById('root')!
10+
});
11+
// @ts-ignore
12+
window.unmount = () => unmount(component);
13+
}, 2000)
14+

0 commit comments

Comments
 (0)