mirror of https://github.com/sveltejs/svelte
21 lines
339 B
21 lines
339 B
3 years ago
|
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);
|
||
|
}
|
||
|
};
|