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/store-child-data/_config.js

22 lines
408 B

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>
`);
}
};