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-binding-parent-su.../_config.js

32 lines
545 B

export default {
html: `
<p>Foo: yes</p>
<p>x in parent: yes</p>
`,
async test({ assert, component, target }) {
component.a = false;
assert.htmlEqual(target.innerHTML, `
<p>Bar: yes</p>
<p>x in parent: yes</p>
`);
component.a = true;
assert.equal(component.x, 'yes');
component.x = undefined;
assert.htmlEqual(target.innerHTML, `
<p>Foo: undefined</p>
<p>x in parent: undefined</p>
`);
component.a = false;
assert.htmlEqual(target.innerHTML, `
<p>Bar: no</p>
<p>x in parent: no</p>
`);
}
};