Skip to content

Commit

Permalink
update CLI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Aug 4, 2018
1 parent 9964a77 commit a823ff3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion test/cli/samples/globals/expected/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var Main = (function(answer) { "use strict";

p(changed, ctx) {
if (changed.answer) {
text_1.data = ctx.answer;
setData(text_1, ctx.answer);
}
},

Expand Down Expand Up @@ -80,6 +80,10 @@ var Main = (function(answer) { "use strict";
target.appendChild(node);
}

function setData(text, data) {
text.data = '' + data;
}

function detachNode(node) {
node.parentNode.removeChild(node);
}
Expand Down
6 changes: 5 additions & 1 deletion test/cli/samples/store/expected/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function create_main_fragment(component, ctx) {

p(changed, ctx) {
if (changed.$name) {
text_1.data = ctx.$name;
setData(text_1, ctx.$name);
}
},

Expand Down Expand Up @@ -75,6 +75,10 @@ function appendNode(node, target) {
target.appendChild(node);
}

function setData(text, data) {
text.data = '' + data;
}

function detachNode(node) {
node.parentNode.removeChild(node);
}
Expand Down

0 comments on commit a823ff3

Please sign in to comment.