mirror of https://github.com/sveltejs/svelte
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.
32 lines
567 B
32 lines
567 B
8 years ago
|
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>
|
||
|
`);
|
||
|
|
||
8 years ago
|
assert.equal( target.querySelector( 'select' ).value, 'a' );
|
||
|
|
||
8 years ago
|
component.destroy();
|
||
8 years ago
|
assert.htmlEqual( target.innerHTML, '' );
|
||
|
}
|
||
|
};
|