Skip to content

Commit a9a07d4

Browse files
committed
fix the test
1 parent 3f3f362 commit a9a07d4

File tree

1 file changed

+2
-1
lines changed
  • transforms/convert-module-for-to-setup-test

1 file changed

+2
-1
lines changed

transforms/convert-module-for-to-setup-test/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,8 @@ module.exports = function(file, api) {
470470
.map(path => path.parent)
471471
.replaceWith(p => {
472472
let body = p.node.expression.arguments[0].body;
473-
return body.body;
473+
474+
return body.body || j.expressionStatement(body);
474475
});
475476

476477
if (replacements.length > 0) {

0 commit comments

Comments
 (0)