diff --git a/packages/babel-plugin-jest-hoist/src/index.ts b/packages/babel-plugin-jest-hoist/src/index.ts index d77ff26afded..2218dcec5421 100644 --- a/packages/babel-plugin-jest-hoist/src/index.ts +++ b/packages/babel-plugin-jest-hoist/src/index.ts @@ -14,8 +14,10 @@ import { CallExpression, Expression, Identifier, + MemberExpression, Node, Program, + Super, VariableDeclaration, VariableDeclarator, callExpression, @@ -197,7 +199,9 @@ function GETTER_NAME() { } `; -const isJestObject = (expression: NodePath): boolean => { +const isJestObject = ( + expression: NodePath, +): expression is NodePath => { // global if ( expression.isIdentifier() && @@ -231,8 +235,8 @@ const isJestObject = (expression: NodePath): boolean => { return false; }; -const extractJestObjExprIfHoistable = ( - expr: NodePath, +const extractJestObjExprIfHoistable = ( + expr: NodePath, ): NodePath | null => { if (!expr.isCallExpression()) { return null;