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/spread-each-element/_config.js

25 lines
437 B

export default {
html: `
<div data-a="1" data-b="2"></div>
<div data-c="3" data-d="4"></div>
`,
props: {
things: [
{ 'data-a': 1, 'data-b': 2 },
{ 'data-c': 3, 'data-d': 4 }
]
},
test({ assert, component, target }) {
const { things } = component;
component.things = things.reverse();
assert.htmlEqual(target.innerHTML, `
<div data-c="3" data-d="4"></div>
<div data-a="1" data-b="2"></div>
`);
},
};