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

14 lines
362 B

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