update CLI tests

pull/1627/head
Rich Harris 6 years ago
parent 9964a77565
commit a823ff32a9

@ -26,7 +26,7 @@ var Main = (function(answer) { "use strict";
p(changed, ctx) { p(changed, ctx) {
if (changed.answer) { if (changed.answer) {
text_1.data = ctx.answer; setData(text_1, ctx.answer);
} }
}, },
@ -80,6 +80,10 @@ var Main = (function(answer) { "use strict";
target.appendChild(node); target.appendChild(node);
} }
function setData(text, data) {
text.data = '' + data;
}
function detachNode(node) { function detachNode(node) {
node.parentNode.removeChild(node); node.parentNode.removeChild(node);
} }

@ -18,7 +18,7 @@ function create_main_fragment(component, ctx) {
p(changed, ctx) { p(changed, ctx) {
if (changed.$name) { if (changed.$name) {
text_1.data = ctx.$name; setData(text_1, ctx.$name);
} }
}, },
@ -75,6 +75,10 @@ function appendNode(node, target) {
target.appendChild(node); target.appendChild(node);
} }
function setData(text, data) {
text.data = '' + data;
}
function detachNode(node) { function detachNode(node) {
node.parentNode.removeChild(node); node.parentNode.removeChild(node);
} }

Loading…
Cancel
Save