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/immutable-root/_config.js

18 lines
444 B

export default {
immutable: true,
html: `<div><h3>Called 0 times.</h3></div>`,
test({ assert, component, target, window }) {
component.$on('state', ({ changed }) => {
if (changed.foo) {
component.count = component.count + 1;
}
});
assert.htmlEqual(target.innerHTML, `<div><h3>Called 0 times.</h3></div>`);
component.foo = component.foo;
assert.htmlEqual(target.innerHTML, `<div><h3>Called 0 times.</h3></div>`);
}
};