diff --git a/lib/index.js b/lib/index.js index bf0ab1e0..bfeae59e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -79,7 +79,8 @@ module.exports = (timeout = 100, extra = null) => { } return ({ types: t, transform }) => { - const node = extra ? transform(extra).ast.program.body[0] : null; + const node = extra ? + transform(extra, { ast: true }).ast.program.body[0] : null; let callback = null; if (t.isExpressionStatement(node)) {