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.
22 lines
408 B
22 lines
408 B
6 years ago
|
import { Store } from '../../../../store.js';
|
||
|
|
||
|
const store = new Store({
|
||
|
selectedIndex: 0,
|
||
|
items: [{ title: 'One' }, { title: 'Two' }]
|
||
|
});
|
||
|
|
||
|
export default {
|
||
|
store,
|
||
|
|
||
|
html: `
|
||
|
<h1>One</h1>
|
||
|
`,
|
||
|
|
||
|
test(assert, component, target, window) {
|
||
|
store.set({ selectedIndex: 2, items: [{ title: 'One' }, { title: 'Two' }, { title: 'Three' }]});
|
||
|
|
||
|
assert.htmlEqual(target.innerHTML, `
|
||
|
<h1>Three</h1>
|
||
|
`);
|
||
|
}
|
||
|
};
|