From 1dad8f1936c5ac974854930b32814db907528f56 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 24 Oct 2017 08:14:02 -0400 Subject: [PATCH] add test for #891 --- test/runtime/samples/set-mutated-data/_config.js | 14 ++++++++++++++ test/runtime/samples/set-mutated-data/main.html | 1 + 2 files changed, 15 insertions(+) create mode 100644 test/runtime/samples/set-mutated-data/_config.js create mode 100644 test/runtime/samples/set-mutated-data/main.html 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 000000000000..bae3fab689e3 --- /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 000000000000..24369f73a466 --- /dev/null +++ b/test/runtime/samples/set-mutated-data/main.html @@ -0,0 +1 @@ +{{foo}} \ No newline at end of file