You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/apply-directives-in-order/_config.js

44 lines
623 B

export default {
get props() {
return { value: '' };
},
html: `
<input>
<p></p>
`,
ssrHtml: `
<input value="">
<p></p>
`,
async test({ assert, target, window }) {
const input = target.querySelector('input');
const event = new window.Event('input');
input.value = 'h';
await input.dispatchEvent(event);
assert.equal(input.value, 'H');
assert.htmlEqual(
target.innerHTML,
`
<input>
<p>H</p>
`
);
input.value = 'he';
await input.dispatchEvent(event);
assert.equal(input.value, 'HE');
assert.htmlEqual(
target.innerHTML,
`
<input>
<p>HE</p>
`
);
}
};