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-values-readonly/_config.js

22 lines
351 B

export default {
html: `
<p>doubled: 2</p>
`,
test({ assert, component, target }) {
component.a = 2;
assert.equal(component.doubled, 4);
assert.htmlEqual(target.innerHTML, `
<p>doubled: 4</p>
`);
component.doubled = 6;
assert.equal(component.doubled, 4);
assert.htmlEqual(target.innerHTML, `
<p>doubled: 4</p>
`);
}
};