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

32 lines
551 B

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