diff --git a/test/runtime/samples/set-mutated-data/_config.js b/test/runtime/samples/set-mutated-data/_config.js new file mode 100644 index 0000000000..bae3fab689 --- /dev/null +++ b/test/runtime/samples/set-mutated-data/_config.js @@ -0,0 +1,14 @@ +const data = { foo: 0 }; + +export default { + data, + + html: '0', + + test(assert, component, target) { + data.foo = 42; + component.set(data); + + assert.htmlEqual(target.innerHTML, '42'); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/set-mutated-data/main.html b/test/runtime/samples/set-mutated-data/main.html new file mode 100644 index 0000000000..24369f73a4 --- /dev/null +++ b/test/runtime/samples/set-mutated-data/main.html @@ -0,0 +1 @@ +{{foo}} \ No newline at end of file