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/dynamic-element-slot/_config.js

30 lines
480 B

export default {
props: {
x: true
},
html: `
<h1>Foo</h1>
<div id="default">
<h1>This is default slot</h1>
</div>
<div id="other">
<h1 slot='other'>This is other slot</h1>
</div>
`,
test({ assert, component, target }) {
component.tag = 'h2';
assert.htmlEqual(target.innerHTML, `
<h1>Foo</h1>
<div id="default">
<h2>This is default slot</h2>
</div>
<div id="other">
<h2 slot='other'>This is other slot</h2>
</div>
`);
}
};