mirror of https://github.com/sveltejs/svelte
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.
27 lines
423 B
27 lines
423 B
7 years ago
|
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>
|
||
|
`);
|
||
|
},
|
||
|
};
|