Fix bug + Generate test fixtures if no expected.js (#4858)

This commit is contained in:
Henry Zhu
2016-11-17 17:53:46 -05:00
committed by GitHub
parent efefe828f9
commit cd041541b8
9 changed files with 50 additions and 20 deletions

View File

@@ -175,11 +175,11 @@ export default function ({ types: t }) {
let nodeWithoutSpread = t.clone(path.node);
nodeWithoutSpread.right = ref;
nodes.push(t.expressionStatement(nodeWithoutSpread));
nodes.push(t.assignmentExpression(
nodes.push(t.toStatement(t.assignmentExpression(
"=",
argument,
callExpression
));
)));
if (ref) {
nodes.push(t.expressionStatement(ref));