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/class-in-each/_config.js

22 lines
354 B

export default {
data: {
things: ['one', 'two', 'three'],
selected: 'two'
},
html: `
<div></div>
<div class="selected"></div>
<div></div>
`,
test(assert, component, target) {
component.set({ selected: 'three' });
assert.htmlEqual(target.innerHTML, `
<div></div>
<div class=""></div>
<div class="selected"></div>
`);
}
};