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/each-block-keyed-shift/_config.js

28 lines
401 B

export default {
props: {
titles: [{ name: 'a' }, { name: 'b' }, { name: 'c' }]
},
html: `
<p>a</p>
<p>b</p>
<p>c</p>
`,
test({ assert, component, target }) {
component.titles = [{ name: 'b' }, { name: 'c' }];
assert.htmlEqual(target.innerHTML, `
<p>b</p>
<p>c</p>
`);
component.titles = [{ name: 'c' }];
assert.htmlEqual(target.innerHTML, `
<p>c</p>
`);
}
};