mirror of https://github.com/sveltejs/svelte
bail out of change tracking on encountering function calls in templates. TODO avoid bailing where possible
parent
2fc75429e8
commit
eb6f7c392c
@ -1,10 +1,16 @@
|
||||
export default {
|
||||
html: '<p>1 + 2 = 3</p>\n<p>3 * 3 = 9</p>',
|
||||
html: `
|
||||
<p>1 + 2 = 3</p>
|
||||
<p>3 * 3 = 9</p>
|
||||
`,
|
||||
|
||||
test(assert, component, target) {
|
||||
component.a = 3;
|
||||
assert.equal(component.c, 5);
|
||||
assert.equal(component.cSquared, 25);
|
||||
assert.equal(target.innerHTML, '<p>3 + 2 = 5</p>\n<p>5 * 5 = 25</p>');
|
||||
assert.equal(component.c(), 5);
|
||||
assert.equal(component.cSquared(), 25);
|
||||
assert.htmlEqual(target.innerHTML, `
|
||||
<p>3 + 2 = 5</p>
|
||||
<p>5 * 5 = 25</p>
|
||||
`);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in new issue