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

27 lines
423 B

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