svelte/test/runtime/samples/set-mutated-data/_config.js

14 lines
189 B

const data = { foo: 0 };
export default {
data,
html: '0',
test(assert, component, target) {
data.foo = 42;
component.set(data);
assert.htmlEqual(target.innerHTML, '42');
}
};