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

26 lines
430 B

export default {
get props() {
return {
animalEntries: [
{ animal: 'raccoon', class: 'mammal' },
{ animal: 'eagle', class: 'bird' }
]
};
},
html: `
<p class="mammal">raccoon</p>
<p class="bird">eagle</p>
`,
test({ assert, component, target }) {
component.animalEntries = [{ animal: 'cow', class: 'mammal' }];
assert.htmlEqual(
target.innerHTML,
`
<p class="mammal">cow</p>
`
);
}
};