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/props-reactive-b/_config.js

37 lines
425 B

export default {
props: {
a: 1,
b: 2
},
html: `
<p>a: 1</p>
<p>b: 2</p>
<p>c: 3</p>
`,
async test({ assert, component, target }) {
await component.$set({ a: 4 });
assert.htmlEqual(
target.innerHTML,
`
<p>a: 4</p>
<p>b: 2</p>
<p>c: 6</p>
`
);
await component.$set({ b: 5 });
assert.htmlEqual(
target.innerHTML,
`
<p>a: 4</p>
<p>b: 5</p>
<p>c: 9</p>
`
);
}
};