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/reactive-value-dependency-n.../_config.js

27 lines
752 B

export default {
html: `
<p>42</p>
<p>42</p>
`,
async test({ assert, component, target }) {
await component.updateStore(undefined);
assert.htmlEqual(target.innerHTML, '<p>undefined</p><p>42</p>');
await component.updateStore(33);
assert.htmlEqual(target.innerHTML, '<p>33</p><p>42</p>');
await component.updateStore(undefined);
assert.htmlEqual(target.innerHTML, '<p>undefined</p><p>42</p>');
await component.updateVar(undefined);
assert.htmlEqual(target.innerHTML, '<p>undefined</p><p>undefined</p>');
await component.updateVar(33);
assert.htmlEqual(target.innerHTML, '<p>undefined</p><p>33</p>');
await component.updateVar(undefined);
assert.htmlEqual(target.innerHTML, '<p>undefined</p><p>undefined</p>');
}
};