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

25 lines
509 B

export default {
props: {
things: [1, 2, 3]
},
html: `
<div>
<div slot="foo"><span>1</span></div>
<div slot="foo"><span>2</span></div>
<div slot="foo"><span>3</span></div>
</div>`,
test({ assert, component, target }) {
component.things = [1, 2, 3, 4];
assert.htmlEqual(target.innerHTML, `
<div>
<div slot="foo"><span>1</span></div>
<div slot="foo"><span>2</span></div>
<div slot="foo"><span>3</span></div>
<div slot="foo"><span>4</span></div>
</div>
`);
}
};