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/select/_config.js

32 lines
567 B

export default {
data: {
item: {
name: 'One',
key: 'a'
}
},
html: `
<select>
<option value="a">One</option>
<option value="b">Two</option>
<option value="c">Three</option>
</select>
`,
test ( assert, component, target ) {
assert.htmlEqual( target.innerHTML,`
<select>
<option value="a">One</option>
<option value="b">Two</option>
<option value="c">Three</option>
</select>
`);
assert.equal( target.querySelector( 'select' ).value, 'a' );
component.destroy();
assert.htmlEqual( target.innerHTML, '' );
}
};