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

21 lines
339 B

export default {
props: {
tag: 'div',
text: 'Foo'
},
html: '<div>Foo</div>',
test({ assert, component, target }) {
const div = target.firstChild;
component.tag = 'nav';
component.text = 'Bar';
assert.htmlEqual(target.innerHTML, `
<nav>Bar</nav>
`);
const h1 = target.firstChild;
assert.notEqual(div, h1);
}
};