remove use of template literals in plugin regression exec test for unsupported environments

This commit is contained in:
Sebastian McKenzie
2015-11-08 05:33:13 -08:00
parent 9d8ee901d1
commit 9616e4b06c

View File

@@ -1,11 +1,11 @@
var code = `
(function() {
function foo(b){
b === "lol";
foo(b);
}
})();
`;
var code = multiline([
"(function() {",
" function foo(b){",
' b === "lol";',
" foo(b);",
" }",
"})();",
]);
transform(code, {
plugins: [
@@ -18,10 +18,12 @@ transform(code, {
if (path.node.seen) {
return;
}
var node = t.blockStatement(path.node.body);
node.seen = true;
path.replaceWith(node);
},
// do type inference
BinaryExpression: function(path) {
var left = path.get("left");
@@ -31,7 +33,5 @@ transform(code, {
}
};
}
],
compact: true,
comments: false,
}).code;
]
});