mirror of https://github.com/sveltejs/svelte
failing test for #1917
parent
cfb6f52f2b
commit
c7265f7292
@ -0,0 +1,26 @@
|
|||||||
|
export default {
|
||||||
|
html: `
|
||||||
|
<input>
|
||||||
|
<p>hello alice</p>
|
||||||
|
`,
|
||||||
|
|
||||||
|
ssrHtml: `
|
||||||
|
<input value="alice">
|
||||||
|
<p>hello alice</p>
|
||||||
|
`,
|
||||||
|
|
||||||
|
async test({ assert, component, target, window }) {
|
||||||
|
const input = target.querySelector('input');
|
||||||
|
assert.equal(input.value, 'alice');
|
||||||
|
|
||||||
|
const event = new window.Event('input');
|
||||||
|
|
||||||
|
input.value = 'bob';
|
||||||
|
await input.dispatchEvent(event);
|
||||||
|
|
||||||
|
assert.htmlEqual(target.innerHTML, `
|
||||||
|
<input>
|
||||||
|
<p>hello bob</p>
|
||||||
|
`);
|
||||||
|
},
|
||||||
|
};
|
@ -0,0 +1,8 @@
|
|||||||
|
<script>
|
||||||
|
const user = {
|
||||||
|
name: 'alice'
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<input bind:value={user.name}>
|
||||||
|
<p>hello {user.name}</p>
|
Loading…
Reference in new issue