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

25 lines
608 B

export default {
html: '<div><p></p></div>',
test({ assert, component, target }) {
const { widget } = component;
assert.equal(widget.show, false);
widget.show = true;
assert.htmlEqual(target.innerHTML, '<div><p>Hello</p></div>');
component.data = 'World';
assert.htmlEqual(target.innerHTML, '<div><p>World</p></div>');
widget.show = false;
assert.htmlEqual(target.innerHTML, '<div><p></p></div>');
component.data = 'Goodbye';
assert.htmlEqual(target.innerHTML, '<div><p></p></div>');
widget.show = true;
assert.htmlEqual(target.innerHTML, '<div><p>Goodbye</p></div>');
}
};