Skip to content

Commit 7a77bfd

Browse files
authored
refactor(valid-expect): eliminate duplicate check (#1179)
1 parent 5934b3b commit 7a77bfd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/rules/valid-expect.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ const getPromiseCallExpressionNode = (node: TSESTree.Node) => {
3333
if (
3434
node.type === AST_NODE_TYPES.CallExpression &&
3535
node.callee.type === AST_NODE_TYPES.MemberExpression &&
36-
isSupportedAccessor(node.callee.object) &&
37-
getAccessorValue(node.callee.object) === 'Promise' &&
36+
isSupportedAccessor(node.callee.object, 'Promise') &&
3837
node.parent
3938
) {
4039
return node;

0 commit comments

Comments
 (0)