File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 44} from '@typescript-eslint/experimental-utils' ;
55import {
66 DescribeAlias ,
7- TestCaseName ,
87 createRule ,
98 getNodeName ,
109 isDescribeCall ,
@@ -47,14 +46,6 @@ const getBlockType = (
4746 return null ;
4847} ;
4948
50- const isEach = ( node : TSESTree . CallExpression ) : boolean =>
51- node . callee . type === AST_NODE_TYPES . CallExpression &&
52- node . callee . callee . type === AST_NODE_TYPES . MemberExpression &&
53- node . callee . callee . property . type === AST_NODE_TYPES . Identifier &&
54- node . callee . callee . property . name === 'each' &&
55- node . callee . callee . object . type === AST_NODE_TYPES . Identifier &&
56- TestCaseName . hasOwnProperty ( node . callee . callee . object . name ) ;
57-
5849type BlockType = 'test' | 'function' | 'describe' | 'arrow' | 'template' ;
5950
6051export default createRule <
@@ -121,9 +112,8 @@ export default createRule<
121112
122113 if (
123114 ( top === 'test' &&
124- ( isEach ( node ) ||
125- ( isTestBlock ( node ) &&
126- node . callee . type !== AST_NODE_TYPES . MemberExpression ) ) ) ||
115+ isTestBlock ( node ) &&
116+ node . callee . type !== AST_NODE_TYPES . MemberExpression ) ||
127117 ( top === 'template' &&
128118 node . callee . type === AST_NODE_TYPES . TaggedTemplateExpression )
129119 ) {
You can’t perform that action at this time.
0 commit comments